from enum import Enum
from typing import Any, List, Union, overload, Iterator, Optional
import datetime

__version__: str

class XLContentType(Enum):
    Workbook: int
    Relationships: int
    WorkbookMacroEnabled: int
    Worksheet: int
    Chartsheet: int
    ExternalLink: int
    Theme: int
    Styles: int
    SharedStrings: int
    Drawing: int
    Chart: int
    ChartStyle: int
    ChartColorStyle: int
    ControlProperties: int
    CalculationChain: int
    VBAProject: int
    CoreProperties: int
    ExtendedProperties: int
    CustomProperties: int
    Comments: int
    Table: int
    VMLDrawing: int
    Unknown: int

class XLProperty(Enum):
    Title: int
    Subject: int
    Creator: int
    Keywords: int
    Description: int
    LastModifiedBy: int
    LastPrinted: int
    CreationDate: int
    ModificationDate: int
    Category: int
    Application: int
    DocSecurity: int
    ScaleCrop: int
    Manager: int
    Company: int
    LinksUpToDate: int
    SharedDoc: int
    HyperlinkBase: int
    HyperlinksChanged: int
    AppVersion: int

class XLSheetState(Enum):
    Visible: int
    Hidden: int
    VeryHidden: int

class XLUnderlineStyle(Enum):
    None_: int
    Single: int
    Double: int

class XLFontSchemeStyle(Enum):
    None_: int
    Major: int
    Minor: int

class XLVerticalAlignRunStyle(Enum):
    Baseline: int
    Subscript: int
    Superscript: int

class XLFillType(Enum):
    Gradient: int
    Pattern: int

class XLPatternType(Enum):
    None_: int
    Solid: int
    MediumGray: int
    DarkGray: int
    LightGray: int
    DarkHorizontal: int
    DarkVertical: int
    DarkDown: int
    DarkUp: int
    DarkGrid: int
    DarkTrellis: int
    LightHorizontal: int
    LightVertical: int
    LightDown: int
    LightUp: int
    LightGrid: int
    LightTrellis: int
    Gray125: int
    Gray0625: int

class XLLineStyle(Enum):
    None_: int
    Thin: int
    Medium: int
    Dashed: int
    Dotted: int
    Thick: int
    Double: int
    Hair: int
    MediumDashed: int
    DashDot: int
    MediumDashDot: int
    DashDotDot: int
    MediumDashDotDot: int
    SlantDashDot: int

class XLAlignmentStyle(Enum):
    General: int
    Left: int
    Right: int
    Center: int
    Top: int
    Bottom: int
    Fill: int
    Justify: int
    CenterContinuous: int
    Distributed: int

class XLDataValidationType(Enum):
    None_: int
    Custom: int
    Date: int
    Decimal: int
    List: int
    TextLength: int
    Time: int
    Whole: int

class XLDataValidationOperator(Enum):
    Between: int
    Equal: int
    GreaterThan: int
    GreaterThanOrEqual: int
    LessThan: int
    LessThanOrEqual: int
    NotBetween: int
    NotEqual: int

class XLDataValidationErrorStyle(Enum):
    Stop: int
    Warning: int
    Information: int

class XLIMEMode(Enum):
    NoControl: int
    Off: int
    On: int
    Disabled: int
    Hiragana: int
    FullKatakana: int
    HalfKatakana: int
    FullAlpha: int
    HalfAlpha: int
    FullHangul: int
    HalfHangul: int

class XLPaneState(Enum):
    Split: int
    Frozen: int
    FrozenSplit: int

class XLPane(Enum):
    BottomRight: int
    TopRight: int
    BottomLeft: int
    TopLeft: int

class XLDataValidationConfig:
    def __init__(self) -> None: ...
    type: XLDataValidationType
    operator_: XLDataValidationOperator
    allow_blank: bool
    show_drop_down: bool
    show_input_message: bool
    show_error_message: bool
    ime_mode: XLIMEMode
    error_style: XLDataValidationErrorStyle
    prompt_title: str
    prompt: str
    error_title: str
    error: str
    formula1: str
    formula2: str

class XLRichTextRun:
    def __init__(self, text: str = ...) -> None: ...
    @property
    def text(self) -> str: ...
    @text.setter
    def text(self, value: str) -> None: ...
    @property
    def font_name(self) -> Optional[str]: ...
    @font_name.setter
    def font_name(self, value: Optional[str]) -> None: ...
    @property
    def font_size(self) -> Optional[int]: ...
    @font_size.setter
    def font_size(self, value: Optional[int]) -> None: ...
    @property
    def font_color(self) -> Optional[XLColor]: ...
    @font_color.setter
    def font_color(self, value: Optional[XLColor]) -> None: ...
    @property
    def bold(self) -> Optional[bool]: ...
    @bold.setter
    def bold(self, value: Optional[bool]) -> None: ...
    @property
    def italic(self) -> Optional[bool]: ...
    @italic.setter
    def italic(self, value: Optional[bool]) -> None: ...
    @property
    def underline(self) -> Optional[bool]: ...
    @underline.setter
    def underline(self, value: Optional[bool]) -> None: ...
    @property
    def strikethrough(self) -> Optional[bool]: ...
    @strikethrough.setter
    def strikethrough(self, value: Optional[bool]) -> None: ...

class XLRichText:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, plainText: str) -> None: ...
    def add_run(self, run: XLRichTextRun) -> None: ...
    @property
    def runs(self) -> Iterator[XLRichTextRun]: ...
    def get_runs(self) -> List[XLRichTextRun]: ...
    @property
    def plain_text(self) -> str: ...
    def empty(self) -> bool: ...
    def clear(self) -> None: ...
    def __str__(self) -> str: ...

class XLDefinedName:
    def __init__(self) -> None: ...
    def name(self) -> str: ...
    def set_name(self, name: str) -> None: ...
    def refers_to(self) -> str: ...
    def set_refers_to(self, formula: str) -> None: ...
    def local_sheet_id(self) -> Optional[int]: ...
    def set_local_sheet_id(self, id: int) -> None: ...
    def hidden(self) -> bool: ...
    def set_hidden(self, hidden: bool) -> None: ...
    def comment(self) -> str: ...
    def set_comment(self, comment: str) -> None: ...
    def valid(self) -> bool: ...

class XLDefinedNames:
    def append(
        self, name: str, formula: str, local_sheet_id: Optional[int] = ...
    ) -> XLDefinedName: ...
    def remove(self, name: str, local_sheet_id: Optional[int] = ...) -> None: ...
    def get(self, name: str, local_sheet_id: Optional[int] = ...) -> XLDefinedName: ...
    def all(self) -> List[XLDefinedName]: ...
    def exists(self, name: str, local_sheet_id: Optional[int] = ...) -> bool: ...
    def count(self) -> int: ...
    def __len__(self) -> int: ...
    def __getitem__(self, name: str) -> XLDefinedName: ...
    def __iter__(self) -> Iterator[XLDefinedName]: ...

class XLDataValidation:
    def empty(self) -> bool: ...
    def sqref(self) -> str: ...
    def type(self) -> XLDataValidationType: ...
    def operator_(self) -> XLDataValidationOperator: ...
    def allow_blank(self) -> bool: ...
    def formula1(self) -> str: ...
    def formula2(self) -> str: ...
    def show_drop_down(self) -> bool: ...
    def show_input_message(self) -> bool: ...
    def show_error_message(self) -> bool: ...
    def ime_mode(self) -> XLIMEMode: ...
    def prompt_title(self) -> str: ...
    def prompt(self) -> str: ...
    def error_title(self) -> str: ...
    def error(self) -> str: ...
    def error_style(self) -> XLDataValidationErrorStyle: ...
    def config(self) -> XLDataValidationConfig: ...
    def apply_config(self, config: XLDataValidationConfig) -> None: ...
    def set_sqref(self, sqref: str) -> None: ...
    def add_cell(self, cell_ref: Union[str, XLCellReference]) -> None: ...
    def add_range(self, range_ref: Union[str, XLCellReference]) -> None: ...
    def remove_cell(self, cell_ref: Union[str, XLCellReference]) -> None: ...
    def remove_range(self, range_ref: Union[str, XLCellReference]) -> None: ...
    def set_type(self, type: XLDataValidationType) -> None: ...
    def set_operator(self, op: XLDataValidationOperator) -> None: ...
    def set_allow_blank(self, allow: bool) -> None: ...
    def set_formula1(self, formula: str) -> None: ...
    def set_formula2(self, formula: str) -> None: ...
    def set_prompt(self, title: str, msg: str) -> None: ...
    def set_error(
        self, title: str, msg: str, style: XLDataValidationErrorStyle = ...
    ) -> None: ...
    def set_show_drop_down(self, show: bool) -> None: ...
    def set_show_input_message(self, show: bool) -> None: ...
    def set_show_error_message(self, show: bool) -> None: ...
    def set_ime_mode(self, mode: XLIMEMode) -> None: ...
    def set_whole_number_range(self, min: float, max: float) -> None: ...
    def set_decimal_range(self, min: float, max: float) -> None: ...
    def set_date_range(self, min: str, max: str) -> None: ...
    def set_time_range(self, min: str, max: str) -> None: ...
    def set_text_length_range(self, min: int, max: int) -> None: ...
    def set_list(self, items: List[str]) -> None: ...
    def set_reference_drop_list(self, sheet_name: str, range_ref: str) -> None: ...

class XLDataValidations:
    def empty(self) -> bool: ...
    def count(self) -> int: ...
    def append(self) -> XLDataValidation: ...
    def add_validation(
        self, config: XLDataValidationConfig, sqref: str
    ) -> XLDataValidation: ...
    @overload
    def at(self, index: int) -> XLDataValidation: ...
    @overload
    def at(self, sqref: str) -> XLDataValidation: ...
    def clear(self) -> None: ...
    @overload
    def remove(self, index: int) -> None: ...
    @overload
    def remove(self, sqref: str) -> None: ...
    def disable_prompts(self) -> bool: ...
    def set_disable_prompts(self, disable: bool) -> None: ...
    def x_window(self) -> int: ...
    def set_x_window(self, x: int) -> None: ...
    def y_window(self) -> int: ...
    def set_y_window(self, y: int) -> None: ...
    def __iter__(self) -> Iterator[XLDataValidation]: ...

class XLContentItem:
    def __init__(self) -> None: ...
    def type(self) -> XLContentType: ...
    def path(self) -> str: ...

class XLContentTypes:
    def add_override(self, path: str, type: Union[XLContentType, int]) -> None: ...
    @overload
    def delete_override(self, path: str) -> None: ...
    @overload
    def delete_override(self, item: XLContentItem) -> None: ...
    def content_item(self, path: str) -> XLContentItem: ...
    def get_content_items(self) -> List[XLContentItem]: ...

class XLComment:
    def valid(self) -> bool: ...
    def ref(self) -> str: ...
    def text(self) -> str: ...
    def author_id(self) -> int: ...
    def set_text(self, text: str) -> None: ...
    def set_author_id(self, id: int) -> None: ...

class XLShapeStyle:
    def width(self) -> int: ...
    def height(self) -> int: ...
    def set_width(self, width: int) -> None: ...
    def set_height(self, height: int) -> None: ...
    def set_raw(self, name: str, value: str) -> None: ...
    def show(self) -> None: ...
    def hide(self) -> None: ...

class XLShapeClientData:
    def auto_fill(self) -> bool: ...
    def set_auto_fill(self, auto_fill: bool) -> None: ...
    def set_anchor(self, anchor: str) -> None: ...

class XLShape:
    def style(self) -> XLShapeStyle: ...
    def client_data(self) -> XLShapeClientData: ...

class XLComments:
    def count(self) -> int: ...
    @overload
    def get(self, index: int) -> XLComment: ...
    @overload
    def get(self, cellRef: str) -> XLComment: ...
    def set(self, cellRef: str, comment: str, author_id: int = 0) -> None: ...
    def shape(self, cellRef: str) -> XLShape: ...
    def delete_comment(self, cellRef: str) -> None: ...
    def author_count(self) -> int: ...
    def author(self, index: int) -> str: ...
    def add_author(self, name: str) -> None: ...

class XLDateTime:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, serial: float) -> None: ...
    @overload
    def __init__(self, timestamp: int) -> None: ...
    def serial(self) -> float: ...
    def as_datetime(self) -> datetime.datetime: ...

class XLColor:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, r: int, g: int, b: int, a: int) -> None: ...
    @overload
    def __init__(self, r: int, g: int, b: int) -> None: ...
    @overload
    def __init__(self, hex: str) -> None: ...
    @overload
    def set(self, r: int, g: int, b: int, a: int) -> None: ...
    @overload
    def set(self, r: int, g: int, b: int) -> None: ...
    @overload
    def set(self, hex: str) -> None: ...
    def alpha(self) -> int: ...
    def red(self) -> int: ...
    def green(self) -> int: ...
    def blue(self) -> int: ...
    def hex(self) -> str: ...

class XLFont:
    def __init__(self) -> None: ...
    def name(self) -> str: ...
    def set_name(self, name: str) -> None: ...
    def size(self) -> int: ...
    def set_size(self, size: int) -> None: ...
    def color(self) -> XLColor: ...
    def set_color(self, color: XLColor) -> None: ...
    def bold(self) -> bool: ...
    def set_bold(self, set: bool = True) -> None: ...
    def italic(self) -> bool: ...
    def set_italic(self, set: bool = True) -> None: ...
    def strikethrough(self) -> bool: ...
    def set_strikethrough(self, set: bool = True) -> None: ...
    def underline(self) -> XLUnderlineStyle: ...
    def set_underline(self, style: Union[XLUnderlineStyle, int] = ...) -> None: ...
    def scheme(self) -> XLFontSchemeStyle: ...
    def set_scheme(self, style: XLFontSchemeStyle) -> None: ...
    def vert_align(self) -> XLVerticalAlignRunStyle: ...
    def set_vert_align(self, style: XLVerticalAlignRunStyle) -> None: ...

class XLFill:
    def __init__(self) -> None: ...
    def fill_type(self) -> XLFillType: ...
    def set_fill_type(self, newFillType: XLFillType, force: bool = False) -> None: ...
    def pattern_type(self) -> XLPatternType: ...
    def set_pattern_type(self, type: XLPatternType) -> None: ...
    def color(self) -> XLColor: ...
    def set_color(self, color: XLColor) -> None: ...
    def background_color(self) -> XLColor: ...
    def set_background_color(self, color: XLColor) -> None: ...

class XLLine:
    def __init__(self) -> None: ...
    def style(self) -> XLLineStyle: ...
    def color(self) -> XLColor: ...
    def __bool__(self) -> bool: ...

class XLBorder:
    def __init__(self) -> None: ...
    def left(self) -> XLLine: ...
    def right(self) -> XLLine: ...
    def top(self) -> XLLine: ...
    def bottom(self) -> XLLine: ...
    def diagonal(self) -> XLLine: ...
    def set_left(
        self, lineStyle: XLLineStyle, lineColor: XLColor, lineTint: float = 0.0
    ) -> None: ...
    def set_right(
        self, lineStyle: XLLineStyle, lineColor: XLColor, lineTint: float = 0.0
    ) -> None: ...
    def set_top(
        self, lineStyle: XLLineStyle, lineColor: XLColor, lineTint: float = 0.0
    ) -> None: ...
    def set_bottom(
        self, lineStyle: XLLineStyle, lineColor: XLColor, lineTint: float = 0.0
    ) -> None: ...
    def set_diagonal(
        self, lineStyle: XLLineStyle, lineColor: XLColor, lineTint: float = 0.0
    ) -> None: ...

class XLAlignment:
    def __init__(self) -> None: ...
    def horizontal(self) -> XLAlignmentStyle: ...
    def set_horizontal(self, style: XLAlignmentStyle) -> None: ...
    def vertical(self) -> XLAlignmentStyle: ...
    def set_vertical(self, style: XLAlignmentStyle) -> None: ...
    def rotation(self) -> int: ...
    def set_rotation(self, rotation: int) -> None: ...
    def wrap_text(self) -> bool: ...
    def set_wrap_text(self, set: bool = True) -> None: ...
    def indent(self) -> int: ...
    def set_indent(self, indent: int) -> None: ...
    def shrink_to_fit(self) -> bool: ...
    def set_shrink_to_fit(self, set: bool = True) -> None: ...

class XLCellFormat:
    def __init__(self) -> None: ...
    def font_index(self) -> int: ...
    def set_font_index(self, index: int) -> None: ...
    def fill_index(self) -> int: ...
    def set_fill_index(self, index: int) -> None: ...
    def border_index(self) -> int: ...
    def set_border_index(self, index: int) -> None: ...
    def number_format_id(self) -> int: ...
    def set_number_format_id(self, id: int) -> None: ...
    def apply_number_format(self) -> bool: ...
    def set_apply_number_format(self, set: bool = True) -> None: ...
    def alignment(self, createIfMissing: bool = False) -> XLAlignment: ...
    def apply_font(self) -> bool: ...
    def set_apply_font(self, set: bool = True) -> None: ...
    def apply_fill(self) -> bool: ...
    def set_apply_fill(self, set: bool = True) -> None: ...
    def apply_border(self) -> bool: ...
    def set_apply_border(self, set: bool = True) -> None: ...
    def apply_alignment(self) -> bool: ...
    def set_apply_alignment(self, set: bool = True) -> None: ...
    def locked(self) -> bool: ...
    def set_locked(self, set: bool = True) -> None: ...
    def hidden(self) -> bool: ...
    def set_hidden(self, set: bool = True) -> None: ...
    def apply_protection(self) -> bool: ...
    def set_apply_protection(self, set: bool = True) -> None: ...

class XLFonts:
    def count(self) -> int: ...
    def font_by_index(self, index: int) -> XLFont: ...
    def __getitem__(self, index: int) -> XLFont: ...
    def create(self, copyFrom: XLFont = ..., styleEntriesPrefix: str = ...) -> int: ...

class XLFills:
    def count(self) -> int: ...
    def fill_by_index(self, index: int) -> XLFill: ...
    def __getitem__(self, index: int) -> XLFill: ...
    def create(self, copyFrom: XLFill = ..., styleEntriesPrefix: str = ...) -> int: ...

class XLBorders:
    def count(self) -> int: ...
    def border_by_index(self, index: int) -> XLBorder: ...
    def __getitem__(self, index: int) -> XLBorder: ...
    def create(
        self, copyFrom: XLBorder = ..., styleEntriesPrefix: str = ...
    ) -> int: ...

class XLCellFormats:
    def count(self) -> int: ...
    def cell_format_by_index(self, index: int) -> XLCellFormat: ...
    def __getitem__(self, index: int) -> XLCellFormat: ...
    def create(
        self, copyFrom: XLCellFormat = ..., styleEntriesPrefix: str = ...
    ) -> int: ...

class XLNumberFormat:
    def __init__(self) -> None: ...
    def number_format_id(self) -> int: ...
    def set_number_format_id(self, id: int) -> None: ...
    def format_code(self) -> str: ...
    def set_format_code(self, code: str) -> None: ...

class XLNumberFormats:
    def count(self) -> int: ...
    def number_format_by_index(self, index: int) -> XLNumberFormat: ...
    def number_format_by_id(self, id: int) -> XLNumberFormat: ...
    def __getitem__(self, index: int) -> XLNumberFormat: ...
    def create(
        self, copyFrom: XLNumberFormat = ..., styleEntriesPrefix: str = ...
    ) -> int: ...

class XLStyles:
    def fonts(self) -> XLFonts: ...
    def fills(self) -> XLFills: ...
    def borders(self) -> XLBorders: ...
    def cell_formats(self) -> XLCellFormats: ...
    def number_formats(self) -> XLNumberFormats: ...

class ImageInfo:
    @property
    def name(self) -> str: ...
    @property
    def path(self) -> str: ...
    @property
    def extension(self) -> str: ...

class XLProperties:
    @overload
    def set_property(self, name: str, value: str) -> None: ...
    @overload
    def set_property(self, name: str, value: int) -> None: ...
    @overload
    def set_property(self, name: str, value: float) -> None: ...
    def property(self, name: str) -> str: ...
    def delete_property(self, name: str) -> None: ...

class XLAppProperties:
    def increment_sheet_count(self, increment: int) -> None: ...
    def align_worksheets(self, names: List[str]) -> None: ...
    def add_sheet_name(self, title: str) -> None: ...
    def delete_sheet_name(self, title: str) -> None: ...
    def set_sheet_name(self, oldTitle: str, newTitle: str) -> None: ...
    def add_heading_pair(self, name: str, value: int) -> None: ...
    def delete_heading_pair(self, name: str) -> None: ...
    def set_heading_pair(self, name: str, newValue: int) -> None: ...
    def set_property(self, name: str, value: str) -> None: ...
    def property(self, name: str) -> str: ...
    def delete_property(self, name: str) -> None: ...
    def append_sheet_name(self, name: str) -> None: ...
    def prepend_sheet_name(self, name: str) -> None: ...
    def insert_sheet_name(self, name: str, index: int) -> None: ...

class XLWorkbook:
    def worksheet(self, name: str) -> XLWorksheet: ...
    def add_worksheet(self, name: str) -> XLWorksheet: ...
    def delete_sheet(self, name: str) -> None: ...
    def clone_sheet(self, existingName: str, newName: str) -> None: ...
    def sheet_count(self) -> int: ...
    def worksheet_names(self) -> List[str]: ...
    def sheet_exists(self, name: str) -> bool: ...
    def defined_names(self) -> XLDefinedNames: ...
    def clear_active_tab(self) -> None: ...

class RowValuesIterator:
    def __iter__(self) -> RowValuesIterator: ...
    def __next__(self) -> List[Any]: ...

class XLDrawingItem:
    def name(self) -> str: ...
    def description(self) -> str: ...
    def row(self) -> int: ...
    def col(self) -> int: ...
    def width(self) -> int: ...
    def height(self) -> int: ...
    def relationship_id(self) -> str: ...

class XLDrawing:
    def image_count(self) -> int: ...
    def image(self, index: int) -> XLDrawingItem: ...
    def add_image(
        self,
        r_id: str,
        name: str,
        description: str,
        row: int,
        col: int,
        width: int,
        height: int,
    ) -> None: ...
    def add_scaled_image(
        self,
        r_id: str,
        name: str,
        description: str,
        data: str,
        row: int,
        col: int,
        scaling_factor: float = 1.0,
    ) -> None: ...

class XLTotalsRowFunction(Enum):
    None_: int
    Sum: int
    Min: int
    Max: int
    Average: int
    Count: int
    CountNums: int
    StdDev: int
    Var: int
    Custom: int

class XLTableColumn:
    def id(self) -> int: ...
    def name(self) -> str: ...
    def set_name(self, name: str) -> None: ...
    def totals_row_function(self) -> XLTotalsRowFunction: ...
    def set_totals_row_function(self, func: XLTotalsRowFunction) -> None: ...
    def totals_row_label(self) -> str: ...
    def set_totals_row_label(self, label: str) -> None: ...
    def calculated_column_formula(self) -> str: ...
    def set_calculated_column_formula(self, formula: str) -> None: ...
    def totals_row_formula(self) -> str: ...
    def set_totals_row_formula(self, formula: str) -> None: ...

class XLTable:
    def __init__(self) -> None: ...
    def name(self) -> str: ...
    def set_name(self, name: str) -> None: ...
    def display_name(self) -> str: ...
    def set_display_name(self, name: str) -> None: ...
    def range_reference(self) -> str: ...
    def set_range_reference(self, ref: str) -> None: ...
    def style_name(self) -> str: ...
    def set_style_name(self, styleName: str) -> None: ...
    def comment(self) -> str: ...
    def set_comment(self, comment: str) -> None: ...
    def show_row_stripes(self) -> bool: ...
    def set_show_row_stripes(self, show: bool) -> None: ...
    def show_column_stripes(self) -> bool: ...
    def set_show_column_stripes(self, show: bool) -> None: ...
    def show_first_column(self) -> bool: ...
    def set_show_first_column(self, show: bool) -> None: ...
    def show_last_column(self) -> bool: ...
    def set_show_last_column(self, show: bool) -> None: ...
    def show_header_row(self) -> bool: ...
    def set_show_header_row(self, show: bool) -> None: ...
    def show_totals_row(self) -> bool: ...
    def set_show_totals_row(self, show: bool) -> None: ...
    def append_column(self, name: str) -> XLTableColumn: ...
    @overload
    def column(self, name: str) -> XLTableColumn: ...
    @overload
    def column(self, id: int) -> XLTableColumn: ...

class XLTables:
    def __init__(self) -> None: ...
    def count(self) -> int: ...
    def __len__(self) -> int: ...
    def __getitem__(self, index: int) -> XLTable: ...
    def get_table(self, name: str) -> XLTable: ...
    def add(self, name: str, range: str) -> XLTable: ...

class XLFilterLogic(Enum):
    And: int
    Or: int

class XLFilterColumn:
    def add_filter(self, value: str) -> None: ...
    def clear_filters(self) -> None: ...
    @overload
    def set_custom_filter(self, op: str, val: str) -> None: ...
    @overload
    def set_custom_filter(
        self, op1: str, val1: str, logic: XLFilterLogic, op2: str, val2: str
    ) -> None: ...
    def set_top10(self, value: float, percent: bool = ..., top: bool = ...) -> None: ...
    def col_id(self) -> int: ...

class XLAutoFilter:
    def __bool__(self) -> bool: ...
    def ref(self) -> str: ...
    def set_ref(self, ref: str) -> None: ...
    def filter_column(self, col_id: int) -> XLFilterColumn: ...

class XLWorksheet:
    def name(self) -> str: ...
    def set_name(self, name: str) -> None: ...
    def index(self) -> int: ...
    def set_index(self, index: int) -> None: ...
    def visibility(self) -> XLSheetState: ...
    def set_visibility(self, state: XLSheetState) -> None: ...
    def is_active(self) -> bool: ...
    def set_active(self) -> None: ...
    def row_count(self) -> int: ...
    def column_count(self) -> int: ...
    def has_drawing(self) -> bool: ...
    def drawing(self) -> XLDrawing: ...
    def has_panes(self) -> bool: ...
    @overload
    def freeze_panes(self, column: int, row: int) -> None: ...
    @overload
    def freeze_panes(self, cellRef: str) -> None: ...
    def split_panes(
        self,
        xSplit: float,
        ySplit: float,
        topLeftCell: str = "",
        activePane: XLPane = ...,
    ) -> None: ...
    def clear_panes(self) -> None: ...
    def has_auto_filter(self) -> bool: ...
    def auto_filter(self) -> str: ...
    def set_auto_filter(self, range: str) -> None: ...
    def clear_auto_filter(self) -> None: ...
    def autofilter_object(self) -> XLAutoFilter: ...
    def set_zoom(self, scale: int) -> None: ...
    def zoom(self) -> int: ...
    def add_hyperlink(self, cellRef: str, url: str, tooltip: str = "") -> None: ...
    def add_internal_hyperlink(
        self, cellRef: str, location: str, tooltip: str = ""
    ) -> None: ...
    def has_hyperlink(self, cellRef: str) -> bool: ...
    def get_hyperlink(self, cellRef: str) -> str: ...
    def remove_hyperlink(self, cellRef: str) -> None: ...
    def data_validations(self) -> XLDataValidations: ...
    def tables(self) -> XLTables: ...
    @overload
    def cell(self, ref: str) -> XLCell: ...
    @overload
    def cell(self, row: int, col: int) -> XLCell: ...
    @overload
    def range(self, address: str) -> XLCellRange: ...
    @overload
    def range(self, topLeft: str, bottomRight: str) -> XLCellRange: ...
    @overload
    def column(self, index: int) -> XLColumn: ...
    @overload
    def column(self, name: str) -> XLColumn: ...
    def merge_cells(
        self, rangeReference: str, emptyHiddenCells: bool = False
    ) -> None: ...
    def unmerge_cells(self, rangeReference: str) -> None: ...
    def column_format(self, column: str) -> int: ...
    def merges(self) -> XLMergeCells: ...
    @overload
    def set_column_format(self, column: str, cellFormatIndex: int) -> None: ...
    @overload
    def set_column_format(self, column: int, cellFormatIndex: int) -> None: ...
    def row_format(self, row: int) -> int: ...
    def set_row_format(self, row: int, cellFormatIndex: int) -> None: ...
    def protect_sheet(self, set: bool = True) -> None: ...
    def protect_objects(self, set: bool = True) -> None: ...
    def protect_scenarios(self, set: bool = True) -> None: ...
    def sheet_protected(self) -> bool: ...
    def objects_protected(self) -> bool: ...
    def scenarios_protected(self) -> bool: ...
    def set_password(self, password: str) -> None: ...
    def clear_password(self) -> None: ...
    def password_hash(self) -> str: ...
    def password_is_set(self) -> bool: ...
    def insert_columns_allowed(self) -> bool: ...
    def insert_rows_allowed(self) -> bool: ...
    def delete_columns_allowed(self) -> bool: ...
    def delete_rows_allowed(self) -> bool: ...
    def select_locked_cells_allowed(self) -> bool: ...
    def select_unlocked_cells_allowed(self) -> bool: ...
    def set_insert_columns_allowed(self, set: bool = True) -> None: ...
    def set_insert_rows_allowed(self, set: bool = True) -> None: ...
    def set_delete_columns_allowed(self, set: bool = True) -> None: ...
    def set_delete_rows_allowed(self, set: bool = True) -> None: ...
    def set_select_locked_cells_allowed(self, set: bool = True) -> None: ...
    def set_select_unlocked_cells_allowed(self, set: bool = True) -> None: ...
    def insert_hyperlinks_allowed(self) -> bool: ...
    def auto_filter_allowed(self) -> bool: ...
    def sort_allowed(self) -> bool: ...
    def pivot_tables_allowed(self) -> bool: ...
    def format_cells_allowed(self) -> bool: ...
    def format_columns_allowed(self) -> bool: ...
    def format_rows_allowed(self) -> bool: ...
    def set_insert_hyperlinks_allowed(self, set: bool = True) -> None: ...
    def set_auto_filter_allowed(self, set: bool = True) -> None: ...
    def set_sort_allowed(self, set: bool = True) -> None: ...
    def set_pivot_tables_allowed(self, set: bool = True) -> None: ...
    def set_format_cells_allowed(self, set: bool = True) -> None: ...
    def set_format_columns_allowed(self, set: bool = True) -> None: ...
    def set_format_rows_allowed(self, set: bool = True) -> None: ...
    def comments(self) -> XLComments: ...
    def add_image(
        self,
        image_data: bytes,
        extension: str,
        row: int,
        col: int,
        width: int,
        height: int,
    ) -> None: ...
    def get_rows_data(self) -> List[List[Any]]: ...
    def get_row_values(self, row: int) -> List[Any]: ...
    def get_range_data(
        self, start_row: int, start_col: int, end_row: int, end_col: int
    ) -> List[List[Any]]: ...
    def get_cell_value(self, row: int, col: int) -> Any: ...
    def iter_row_values(self) -> RowValuesIterator: ...
    def write_range_data(self, start_row: int, start_col: int, data: Any) -> None: ...
    def get_range_values(
        self, start_row: int, start_col: int, end_row: int, end_col: int
    ) -> Any: ...
    def set_cell_value(self, row: int, col: int, value: Any) -> None: ...
    def write_rows_data(
        self, start_row: int, start_col: int, rows: List[List[Any]]
    ) -> None: ...
    def write_row_data(self, row: int, start_col: int, values: List[Any]) -> None: ...
    def set_cells_batch(self, cells: List[tuple]) -> None: ...


    def add_chart(self, type: XLChartType, name: str, row: int, col: int, width: int, height: int) -> Any: ...
    def add_pivot_table(self, options: XLPivotTableOptions) -> None: ...
    def stream_writer(self) -> Any: ...
    def stream_reader(self) -> Any: ...
    def auto_fit_column(self, col: int) -> None: ...
    def apply_auto_filter(self) -> None: ...
    def set_print_area(self, sqref: str) -> None: ...
    def set_print_title_rows(self, start: int, end: int) -> None: ...
    def set_print_title_cols(self, start: int, end: int) -> None: ...
    def add_sparkline(self, location: str, data_range: str, type: XLSparklineType = ...) -> None: ...
    def add_comment(self, cell_ref: str, text: str, author: str) -> None: ...
    def add_conditional_formatting(self, sqref: str, rule: XLCfRule) -> None: ...
    def remove_conditional_formatting(self, sqref: str) -> None: ...
    def clear_all_conditional_formatting(self) -> None: ...
    def page_margins(self) -> XLPageMargins: ...
    def print_options(self) -> XLPrintOptions: ...
    def page_setup(self) -> XLPageSetup: ...

class XLColumn:
    def width(self) -> float: ...
    def set_width(self, width: float) -> None: ...
    def is_hidden(self) -> bool: ...
    def set_hidden(self, state: bool) -> None: ...
    def format(self) -> int: ...
    def set_format(self, cellFormatIndex: int) -> None: ...

class XLMergeCells:
    def count(self) -> int: ...
    def find_merge(self, cellRef: str) -> str: ...
    def merge_exists(self, rangeRef: str) -> bool: ...
    def append_merge(self, rangeRef: str) -> None: ...
    def delete_merge(self, rangeRef: str) -> None: ...
    def __getitem__(self, index: int) -> str: ...

class XLCellReference:
    @overload
    def __init__(self, address: str) -> None: ...
    @overload
    def __init__(self, row: int, col: int) -> None: ...
    def address(self) -> str: ...
    def row(self) -> int: ...
    def column(self) -> int: ...

class XLCellRange:
    def address(self) -> str: ...
    def num_rows(self) -> int: ...
    def num_columns(self) -> int: ...
    def clear(self) -> None: ...
    def __iter__(self) -> Iterator[XLCell]: ...

class XLFormula:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, formula: str) -> None: ...
    def get(self) -> str: ...
    def clear(self) -> None: ...
    def __str__(self) -> str: ...
    def __eq__(self, other: object) -> bool: ...

class XLCell:
    @property
    def value(self) -> Any: ...
    @value.setter
    def value(self, value: Any) -> None: ...
    def get_formula(self) -> str: ...
    def set_formula(self, value: Union[str, XLFormula]) -> None: ...
    def clear_formula(self) -> None: ...
    def has_formula(self) -> bool: ...
    def cell_reference(self) -> XLCellReference: ...
    def cell_format(self) -> int: ...
    def set_cell_format(self, index: int) -> None: ...

class XLDocument:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, path: str) -> None: ...
    def open(self, path: str) -> None: ...
    def create(self, name: str, force_overwrite: bool = True) -> None: ...
    def close(self) -> None: ...
    def is_open(self) -> bool: ...
    def name(self) -> str: ...
    def path(self) -> str: ...
    def save(self) -> None: ...
    def save_as(self, name: str, force_overwrite: bool = True) -> None: ...
    def workbook(self) -> XLWorkbook: ...
    def content_types(self) -> XLContentTypes: ...
    def app_properties(self) -> XLAppProperties: ...
    def core_properties(self) -> XLProperties: ...
    def property(self, property: Union[XLProperty, int]) -> str: ...
    def set_property(self, property: Union[XLProperty, int], value: str) -> None: ...
    def delete_property(self, property: Union[XLProperty, int]) -> None: ...
    def custom_property(self, name: str) -> str: ...
    def set_custom_property(self, name: str, value: str) -> None: ...
    def delete_custom_property(self, name: str) -> None: ...
    def add_image(self, name: str, data: bytes) -> str: ...
    def get_image(self, path: str) -> bytes: ...
    def styles(self) -> XLStyles: ...
    def get_embedded_images(self) -> List[ImageInfo]: ...
    def get_image_data(self, image_path: str) -> bytes: ...
    def get_archive_entries(self) -> List[str]: ...
    def has_archive_entry(self, path: str) -> bool: ...
    def get_archive_entry(self, path: str) -> bytes: ...
    def __enter__(self) -> XLDocument: ...
    def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ...

class XLPageOrientation(Enum):
    Default: int
    Portrait: int
    Landscape: int

class XLChartType(Enum):
    Bar: int
    BarStacked: int
    BarPercentStacked: int
    Bar3D: int
    Bar3DStacked: int
    Bar3DPercentStacked: int
    Line: int
    LineStacked: int
    LinePercentStacked: int
    Line3D: int
    Pie: int
    Pie3D: int
    Scatter: int
    Area: int
    AreaStacked: int
    AreaPercentStacked: int
    Area3D: int
    Area3DStacked: int
    Area3DPercentStacked: int
    Doughnut: int
    Radar: int
    RadarFilled: int
    RadarMarkers: int

class XLPivotSubtotal(Enum):
    Sum: int
    Average: int
    Count: int
    Max: int
    Min: int
    Product: int

class XLSparklineType(Enum):
    Line: int
    Column: int
    Stacked: int

class XLCfOperator(Enum):
    LessThan: int
    LessThanOrEqual: int
    Equal: int
    NotEqual: int
    GreaterThanOrEqual: int
    GreaterThan: int
    Between: int
    NotBetween: int
    ContainsText: int
    NotContains: int
    BeginsWith: int
    EndsWith: int
    Invalid: int

class XLPivotField:
    def __init__(self) -> None: ...
    name: str
    subtotal: XLPivotSubtotal
    custom_name: str

class XLPivotTableOptions:
    def __init__(self) -> None: ...
    name: str
    source_range: str
    target_cell: str
    rows: List[XLPivotField]
    columns: List[XLPivotField]
    data: List[XLPivotField]
    filters: List[XLPivotField]

class XLCfRule:
    def __init__(self) -> None: ...
    def summary(self) -> str: ...

def XLColorScaleRule(c1: XLColor, c2: XLColor, c3: XLColor = ...) -> XLCfRule: ...
def XLDataBarRule(color: XLColor, show_value: bool = ...) -> XLCfRule: ...
def XLCellIsRule(op: Union[XLCfOperator, str], val: str) -> XLCfRule: ...
def XLFormulaRule(formula: str) -> XLCfRule: ...
def XLIconSetRule(icon_set_name: str = ..., show_value: bool = ..., reverse: bool = ...) -> XLCfRule: ...
def XLTop10Rule(rank: int = ..., percent: bool = ..., bottom: bool = ...) -> XLCfRule: ...
def XLAboveAverageRule(above_average: bool = ..., equal_average: bool = ..., std_dev: int = ...) -> XLCfRule: ...
def XLDuplicateValuesRule(unique: bool = ...) -> XLCfRule: ...
def XLContainsTextRule(text: str) -> XLCfRule: ...
def XLNotContainsTextRule(text: str) -> XLCfRule: ...
def XLContainsBlanksRule() -> XLCfRule: ...
def XLNotContainsBlanksRule() -> XLCfRule: ...
def XLContainsErrorsRule() -> XLCfRule: ...
def XLNotContainsErrorsRule() -> XLCfRule: ...

class XLPageMargins:
    def __init__(self) -> None: ...
    def left(self) -> float: ...
    def set_left(self, val: float) -> None: ...
    def right(self) -> float: ...
    def set_right(self, val: float) -> None: ...
    def top(self) -> float: ...
    def set_top(self, val: float) -> None: ...
    def bottom(self) -> float: ...
    def set_bottom(self, val: float) -> None: ...
    def header(self) -> float: ...
    def set_header(self, val: float) -> None: ...
    def footer(self) -> float: ...
    def set_footer(self, val: float) -> None: ...

class XLPrintOptions:
    def __init__(self) -> None: ...
    def grid_lines(self) -> bool: ...
    def set_grid_lines(self, val: bool) -> None: ...
    def headings(self) -> bool: ...
    def set_headings(self, val: bool) -> None: ...
    def horizontal_centered(self) -> bool: ...
    def set_horizontal_centered(self, val: bool) -> None: ...
    def vertical_centered(self) -> bool: ...
    def set_vertical_centered(self, val: bool) -> None: ...

class XLPageSetup:
    def __init__(self) -> None: ...
    def paper_size(self) -> int: ...
    def set_paper_size(self, val: int) -> None: ...
    def orientation(self) -> XLPageOrientation: ...
    def set_orientation(self, val: XLPageOrientation) -> None: ...
    def scale(self) -> int: ...
    def set_scale(self, val: int) -> None: ...
    def fit_to_width(self) -> int: ...
    def set_fit_to_width(self, val: int) -> None: ...
    def fit_to_height(self) -> int: ...
    def set_fit_to_height(self, val: int) -> None: ...
    def page_order(self) -> str: ...
    def set_page_order(self, val: str) -> None: ...
    def use_first_page_number(self) -> bool: ...
    def set_use_first_page_number(self, val: bool) -> None: ...
    def first_page_number(self) -> int: ...
    def set_first_page_number(self, val: int) -> None: ...
    def black_and_white(self) -> bool: ...
    def set_black_and_white(self, val: bool) -> None: ...

