# build-aux/mypy-stubs/xlwt/__init__.pyi - Type stubs for xlwt # # Copyright (C) 2025 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later import datetime import decimal import typing import xlwt.Cell from .ExcelFormula import Formula as Formula from .Formatting import Alignment as Alignment from .Formatting import Borders as Borders from .Formatting import Font as Font from .Formatting import Pattern as Pattern from .Formatting import Protection as Protection from .Style import XFStyle as XFStyle from .Style import add_palette_colour as add_palette_colour from .Style import easyfont as easyfont from .Style import easyxf as easyxf __VERSION__: str class Workbook: def __init__(self, encoding: str = "ascii", style_compression: int = 0) -> None: ... def add_sheet( self, sheetname: str, cell_overwrite_ok: bool = False ) -> Worksheet: ... def save(self, filename_or_stream: str | typing.BinaryIO) -> None: ... type _RichText = list[str | tuple[str, Font]] type _Date = datetime.datetime | datetime.date | datetime.time type _Number = int | decimal.Decimal | float type _Label = str | _Number | bytes | _Date | bool | None | Formula | _RichText class Worksheet: def write( self, r: int, c: int, label: _Label = "", style: XFStyle = ..., ) -> None: ... def write_merge( self, r1: int, r2: int, c1: int, c2: int, label: _Label = "", style: XFStyle = ..., ) -> None: ... def col(self, indx: int) -> Column: ... def row(self, indx: int) -> Row: ... class Column: width: int def set_width(self, width: int) -> None: ... def get_width(self) -> int: ... def set_style(self, style: XFStyle) -> None: ... def width_in_pixels(self) -> int: ... class Row: height: int has_default_height: typing.Literal[0, 1] height_mismatch: typing.Literal[0, 1] level: typing.Literal[0, 1, 2, 3, 4, 5, 6, 7] collapse: typing.Literal[0, 1] hidden: typing.Literal[0, 1] space_above: typing.Literal[0, 1] space_below: typing.Literal[0, 1] def get_height_in_pixels(self) -> int: ... def set_style(self, style: XFStyle) -> None: ... def get_xf_index(self) -> int: ... def get_cells_count(self) -> int: ... def get_min_col(self) -> int: ... def get_max_col(self) -> int: ... def insert_cell(self, col_index: int, cell_obj: xlwt.Cell._Cell) -> None: ... def inert_mulcells( self, colx1: int, colx2: int, cell_obj: xlwt.Cell._Cell ) -> None: ... def get_index(self) -> int: ... def set_cell_text(self, colx: int, value: str, style: XFStyle = ...) -> None: ... def set_cell_blank(self, colx: int, style: XFStyle = ...) -> None: ... def set_cell_mulblanks( self, first_colx: int, last_colx: int, style: XFStyle = ... ) -> None: ... def set_cell_number( self, colx: int, number: _Number, style: XFStyle = ... ) -> None: ... def set_cell_date( self, colx: int, datetime_obj: _Date, style: XFStyle = ..., ) -> None: ... def set_cell_formula( self, colx: int, formula: Formula, style: XFStyle = ..., calc_flags: int = 0 ) -> None: ... def set_cell_boolean( self, colx: int, value: bool, style: XFStyle = ... ) -> None: ... def set_cell_error( self, colx: int, error_string_or_code: str | int, style: XFStyle = ... ) -> None: ... def set_cell_rich_text( self, col: int, rich_text_list: _RichText, style: XFStyle = ... ) -> None: ... def write(self, col: int, label: _Label, style: XFStyle = ...) -> None: ...