zut.excel.ExcelWorkbook

class zut.excel.ExcelWorkbook(path: str | ~pathlib._local.Path, *, formula=<object object>, archivate: bool | str | ~pathlib._local.Path = False, save_as: str | ~pathlib._local.Path | bool | None = None)

Bases: object

__init__(path: str | ~pathlib._local.Path, *, formula=<object object>, archivate: bool | str | ~pathlib._local.Path = False, save_as: str | ~pathlib._local.Path | bool | None = None)
  • formula: value to return if a cell is a formula. If not set, return the formula itself (starting with ‘=’).

  • archivate: if True or a path, archivate before saving.

  • save_as: save at this path instead of the original path.

Methods

__init__(path, *[, formula, archivate, save_as])

close()

close_all()

create_table(name[, no_headers])

get_global_named_value(name)

get_global_named_values(name)

get_instance(path, *[, formula, archivate, ...])

get_or_create_table(name[, no_headers])

Return (table, created).

get_table([name, default])

save(*[, save_as])

Attributes

pyxl_workbook

get_or_create_table(name: str, no_headers: bool = False) tuple[ExcelTable, bool]

Return (table, created).