write_excel_mapping_template()

Generate an Excel mapping template with component and representation tabs.

Usage

Source

write_excel_mapping_template(
    components, rep_maps=None, output_path=Path("mapping.xlsx")
)

Parameters

components: Sequence[str]

An ordered list of unique target component IDs.

rep_maps: Sequence[str] | None = None

A sequence of unique names for which dedicated representation mapping tabs should be created.

output_path: Path = Path("mapping.xlsx")
The full path where the Excel file will be saved.

Returns

Path
The file path to the saved Excel workbook.

Raises

ValueError

If components validation fails (delegated to helper).

FileNotFoundError

If the parent directory for output_path does not exist.

RuntimeError
If saving the workbook fails due to I/O issues.