1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
|
# build-aux/mypy-stubs/xlrd/sheet.pyi - Type stubs for xlrd
#
# Copyright (C) 2025 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
import collections.abc
import typing
import _typeshed
import xlrd.biffh
import xlrd.book
type _CellType = typing.Literal[0, 1, 2, 3, 4, 5, 6]
type _CellValueEMPTY = typing.Literal[""]
type _CellValueTEXT = str
type _CellValueNUMBER = float
type _CellValueDATE = float
type _CellValueBOOLEAN = typing.Literal[0, 1]
type _CellValueERROR = int
type _CellValueBLANK = typing.Literal[""]
type _CellValue = _CellValueEMPTY | _CellValueTEXT | _CellValueNUMBER | _CellValueDATE | _CellValueBOOLEAN | _CellValueERROR | _CellValueBLANK
class Cell(xlrd.biffh.BaseObject):
ctype: _CellType
value: _CellValue
xf_index: int | None
@typing.overload
def __init__(
self,
ctype: typing.Literal[0],
value: _CellValueEMPTY,
xf_index: int | None = None,
) -> None: ...
@typing.overload
def __init__(
self,
ctype: typing.Literal[1],
value: _CellValueTEXT,
xf_index: int | None = None,
) -> None: ...
@typing.overload
def __init__(
self,
ctype: typing.Literal[2],
value: _CellValueNUMBER,
xf_index: int | None = None,
) -> None: ...
@typing.overload
def __init__(
self,
ctype: typing.Literal[3],
value: _CellValueDATE,
xf_index: int | None = None,
) -> None: ...
@typing.overload
def __init__(
self,
ctype: typing.Literal[4],
value: _CellValueBOOLEAN,
xf_index: int | None = None,
) -> None: ...
@typing.overload
def __init__(
self,
ctype: typing.Literal[5],
value: _CellValueERROR,
xf_index: int | None = None,
) -> None: ...
@typing.overload
def __init__(
self,
ctype: typing.Literal[6],
value: _CellValueBLANK,
xf_index: int | None = None,
) -> None: ...
empty_cell: Cell
class MSODrawing(xlrd.biffh.BaseObject): ...
class MSObj(xlrd.biffh.BaseObject): ...
class MSTxo(xlrd.biffh.BaseObject): ...
class Note(xlrd.biffh.BaseObject):
author: str
col_hidden: bool | _CellValueBOOLEAN
colx: int
rich_text_runlist: list[tuple[int, int]] | None
row_hidden: bool | _CellValueBOOLEAN
rowx: int
show: list[tuple[int, int]] | None
text: str
class Hyperlink(xlrd.biffh.BaseObject):
frowx: int | None
lrowx: int | None
fcolx: int | None
lcolx: int | None
type: typing.Literal["url", "local file", "unc", "workbook", "unknown"] | None
url_or_path: str | None
desc: str | None
target: str | None
textmark: str | None
quicktip: str | None
class Colinfo(xlrd.biffh.BaseObject):
width: int
xf_index: int
hidden: int
bit1_flag: int
outline_level: int
collapsed: int
class Rowinfo(xlrd.biffh.BaseObject):
height: int | None
has_default_height: _CellValueBOOLEAN | None
outline_level: typing.Literal[0, 1, 2, 3, 4, 5, 6, 7] | None
outline_group_starts_ends: _CellValueBOOLEAN | None
hidden: _CellValueBOOLEAN | None
height_mismatch: _CellValueBOOLEAN | None
has_default_xf_index: _CellValueBOOLEAN | None
xf_index: int | None
additional_space_above: _CellValueBOOLEAN | None
additional_space_below: _CellValueBOOLEAN | None
class Sheet(xlrd.biffh.BaseObject):
name: str
book: xlrd.book.Book | None
nrows: int
ncols: int
colinfo_map: dict[_typeshed.Incomplete, _typeshed.Incomplete]
rowinfo_map: dict[_typeshed.Incomplete, _typeshed.Incomplete]
col_label_ranges: list[_typeshed.Incomplete]
row_label_ranges: list[_typeshed.Incomplete]
merged_cells: list[_typeshed.Incomplete]
rich_text_runlist_map: dict[_typeshed.Incomplete, _typeshed.Incomplete]
defcolwidth: int | None
standardwidth: int | None
default_row_height: int | None
default_row_height_mismatch: int | None
default_row_hidden: int | None
default_additional_space_above: int | None
default_additional_space_below: int | None
visibility: typing.Literal[0, 1, 2]
gcw: tuple[
int, # 0
int, # 1
int, # 2
int, # 3
int, # 4
int, # 5
int, # 6
int, # 7
int, # 8
int, # 9
int, # 10
int, # 11
int, # 12
int, # 13
int, # 14
int, # 15
int, # 16
int, # 17
int, # 18
int, # 19
int, # 20
int, # 21
int, # 22
int, # 23
int, # 24
int, # 25
int, # 26
int, # 27
int, # 28
int, # 29
int, # 30
int, # 31
int, # 32
int, # 33
int, # 34
int, # 35
int, # 36
int, # 37
int, # 38
int, # 39
int, # 40
int, # 41
int, # 42
int, # 43
int, # 44
int, # 45
int, # 46
int, # 47
int, # 48
int, # 49
int, # 50
int, # 51
int, # 52
int, # 53
int, # 54
int, # 55
int, # 56
int, # 57
int, # 58
int, # 59
int, # 60
int, # 61
int, # 62
int, # 63
int, # 64
int, # 65
int, # 66
int, # 67
int, # 68
int, # 69
int, # 70
int, # 71
int, # 72
int, # 73
int, # 74
int, # 75
int, # 76
int, # 77
int, # 78
int, # 79
int, # 80
int, # 81
int, # 82
int, # 83
int, # 84
int, # 85
int, # 86
int, # 87
int, # 88
int, # 89
int, # 90
int, # 91
int, # 92
int, # 93
int, # 94
int, # 95
int, # 96
int, # 97
int, # 98
int, # 99
int, # 100
int, # 101
int, # 102
int, # 103
int, # 104
int, # 105
int, # 106
int, # 107
int, # 108
int, # 109
int, # 110
int, # 111
int, # 112
int, # 113
int, # 114
int, # 115
int, # 116
int, # 117
int, # 118
int, # 119
int, # 120
int, # 121
int, # 122
int, # 123
int, # 124
int, # 125
int, # 126
int, # 127
int, # 128
int, # 129
int, # 130
int, # 131
int, # 132
int, # 133
int, # 134
int, # 135
int, # 136
int, # 137
int, # 138
int, # 139
int, # 140
int, # 141
int, # 142
int, # 143
int, # 144
int, # 145
int, # 146
int, # 147
int, # 148
int, # 149
int, # 150
int, # 151
int, # 152
int, # 153
int, # 154
int, # 155
int, # 156
int, # 157
int, # 158
int, # 159
int, # 160
int, # 161
int, # 162
int, # 163
int, # 164
int, # 165
int, # 166
int, # 167
int, # 168
int, # 169
int, # 170
int, # 171
int, # 172
int, # 173
int, # 174
int, # 175
int, # 176
int, # 177
int, # 178
int, # 179
int, # 180
int, # 181
int, # 182
int, # 183
int, # 184
int, # 185
int, # 186
int, # 187
int, # 188
int, # 189
int, # 190
int, # 191
int, # 192
int, # 193
int, # 194
int, # 195
int, # 196
int, # 197
int, # 198
int, # 199
int, # 200
int, # 201
int, # 202
int, # 203
int, # 204
int, # 205
int, # 206
int, # 207
int, # 208
int, # 209
int, # 210
int, # 211
int, # 212
int, # 213
int, # 214
int, # 215
int, # 216
int, # 217
int, # 218
int, # 219
int, # 220
int, # 221
int, # 222
int, # 223
int, # 224
int, # 225
int, # 226
int, # 227
int, # 228
int, # 229
int, # 230
int, # 231
int, # 232
int, # 233
int, # 234
int, # 235
int, # 236
int, # 237
int, # 238
int, # 239
int, # 240
int, # 241
int, # 242
int, # 243
int, # 244
int, # 245
int, # 246
int, # 247
int, # 248
int, # 249
int, # 250
int, # 251
int, # 252
int, # 253
int, # 254
int, # 255
]
hyperlink_list: list[_typeshed.Incomplete]
hyperlink_map: dict[_typeshed.Incomplete, _typeshed.Incomplete]
cell_note_map: dict[_typeshed.Incomplete, _typeshed.Incomplete]
vert_split_pos: int
horz_split_pos: int
horz_split_first_visible: int
vert_split_first_visible: int
split_active_pane: int
has_pane_record: int
horizontal_page_breaks: list[_typeshed.Incomplete]
vertical_page_breaks: list[_typeshed.Incomplete]
def __init__(
self, book: xlrd.book.Book, position: int, name: str, number: int
) -> None: ...
# cell
def cell(self, rowx: int, colx: int) -> Cell: ...
def cell_value(self, rowx: int, colx: int) -> _CellValue: ...
def cell_type(self, rowx: int, colx: int) -> _CellType: ...
def cell_xf_index(self, rowx: int, colx: int) -> int: ...
# row
def row_len(self, rowx: int) -> int: ...
def row(self, rowx: int) -> list[Cell]: ...
@typing.overload
def __getitem__(self, item: tuple[int, int]) -> Cell: ...
@typing.overload
def __getitem__(self, item: int) -> list[Cell]: ...
def get_rows(self) -> collections.abc.Iterator[list[Cell]]: ...
def __iter__(self) -> collections.abc.Iterator[list[Cell]]: ...
def row_types(
self, rowx: int, start_colx: int = 0, end_colx: int | None = None
) -> list[_CellType]: ...
def row_values(
self, rowx: int, start_colx: int = 0, end_colx: int | None = None
) -> list[_CellValue]: ...
def row_slice(
self, rowx: int, start_colx: int = 0, end_colx: int | None = None
) -> list[Cell]: ...
# col
def col_slice(
self, colx: int, start_rowx: int = 0, end_rowx: int | None = None
) -> list[Cell]: ...
def col_values(
self, colx: int, start_rowx: int = 0, end_rowx: int | None = None
) -> list[_CellValue]: ...
def col_types(
self, colx: int, start_rowx: int = 0, end_rowx: int | None = None
) -> list[_CellType]: ...
def col(
self, colx: int, start_rowx: int = 0, end_rowx: int | None = None
) -> list[Cell]: ...
|