# build-aux/mypy-stubs/xlrd/sheet.pyi - Type stubs for xlrd # # Copyright (C) 2025 Luke T. Shumaker # 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]: ...