assets_guardian.core.reporting.excel.writer๏ƒ

Classes

ExcelWorksheet(sheet)

Wrapper around an openpyxl sheet to simplify writing and tracking.

ExcelWriter([sheet_builders])

Implementation of the IWriter port for Excel.

class assets_guardian.core.reporting.excel.writer.ExcelWorksheet(sheet: Any)[source]๏ƒ

Bases: object

Wrapper around an openpyxl sheet to simplify writing and tracking.

append_row(values: list[Any], is_header: bool = False) None[source]๏ƒ

Appends a styled row as a WriteOnlyCell.

set_column_widths(widths: list[int] | list[float]) None[source]๏ƒ

Sets the column widths by index (1-based).

property title: str๏ƒ

Name of the sheet.

class assets_guardian.core.reporting.excel.writer.ExcelWriter(sheet_builders: list[ISheetBuilder] | None = None)[source]๏ƒ

Bases: object

Implementation of the IWriter port for Excel.

Initializes the writer with a list of sheet builders.

write(data: Any, output_path: str | Path, existing_file_path: str | Path | None = None, rules_file_path: str | Path | None = None, employees_file_path: str | None = None) None[source]๏ƒ

Writes a complete Excel workbook by delegating tasks to builders.