Skip to content

Excel Export API Reference

to_excel

to_excel

to_excel(doc, path, *, mode='structured', include_long_text=False, include_classification=False, include_bim_guid=False, formulas=False)

Export a GAEBDocument to an Excel workbook.

Parameters:

Name Type Description Default
doc GAEBDocument

The document to export.

required
path str | Path

Output file path (.xlsx).

required
mode str

"structured" for a single hierarchy-aware sheet, or "full" for a multi-sheet workbook (BoQ + Items + Summary + Info).

'structured'
include_long_text bool

Add a "Long Text" column.

False
include_classification bool

Add classification columns (trade, element_type, confidence).

False
include_bim_guid bool

Add a "BIM GUID" column (procurement only).

False
formulas bool

When True, replace static computed totals on item rows with live =Qty*UnitPrice formulas so changing input values in Excel updates downstream cells. Procurement only.

False

ColumnDef

ColumnDef dataclass

ColumnDef(key, header, width=14, number_format=None)

Definition of an Excel column.