from typing import Any, Optional, Union
from datetime import datetime, date
from .formula import Formula
from ._openxlsx import XLCell, XLFont, XLFill, XLBorder, XLAlignment

class Cell:
    __slots__ = ("_cell", "_worksheet_ref", "_workbook_ref", "__weakref__")
    _cell: XLCell
    @property
    def _worksheet(self) -> Optional[Any]: ...
    @property
    def _workbook(self) -> Optional[Any]: ...
    def __init__(self, raw_cell: XLCell, worksheet: Any = None) -> None: ...
    @property
    def comment(self) -> Optional[str]: ...
    @comment.setter
    def comment(self, value: Optional[str]) -> None: ...
    @property
    def value(self) -> Any: ...
    @value.setter
    def value(self, val: Any) -> None: ...
    @property
    def formula(self) -> Formula: ...
    @formula.setter
    def formula(self, val: Union[str, Formula]) -> None: ...
    @property
    def style_index(self) -> int: ...
    @style_index.setter
    def style_index(self, val: int) -> None: ...
    @property
    def style(self) -> Union[int, Any]: ...
    @style.setter
    def style(self, val: Union[int, Any]) -> None: ...
    @property
    def font(self) -> Optional[XLFont]: ...
    @property
    def fill(self) -> Optional[XLFill]: ...
    @property
    def border(self) -> Optional[XLBorder]: ...
    @property
    def alignment(self) -> Optional[XLAlignment]: ...
    @property
    def is_date(self) -> bool: ...

def datetime_to_serial(val: Union[date, datetime]) -> float: ...
def serial_to_datetime(serial: float) -> datetime: ...
