Excel Transform

ExcelTransformConfig — Excel-based data source with sheet mappings.

class ExcelTransformConfig(file_key, file_name, sheet_mapping)[source]

Data source that imports rows from an Excel workbook.

Parameters:
  • file_key (str) – Internal storage key identifying the workbook file.

  • file_name (str) – Display-facing file name shown in the UI.

  • sheet_mapping (list[tuple[str, str]]) – (source_sheet, target_sheet) pairs feeding model tables.

set_debug_file(debug_file)[source]

Emit a debug copy of the imported workbook.

Return type:

ExcelTransformConfig

set_manual_sheet_names(manual_sheet_names)[source]

Resolve sheet names manually rather than via the configured mapping.

Return type:

ExcelTransformConfig

set_import_object_references_as_keys(import_object_references_as_keys)[source]

Treat object-reference cells as raw keys instead of resolved objects.

Return type:

ExcelTransformConfig

set_per_sheet_overrides(per_sheet_overrides)[source]

Override import options per source sheet name.

Return type:

ExcelTransformConfig

property type: DataSourceType

The DataSourceType discriminator for this configuration.

ImportOptionOverrides — per-sheet overrides used by ExcelTransformConfig.

class ImportOptionOverrides(match_column_count=False, match_column_headers=False, match_existing_rows=False, preserve_ordering=False)[source]

Per-sheet overrides for column matching, ordering, and row reconciliation.

Parameters:
  • match_column_count (bool) – Reject the import if the column count differs.

  • match_column_headers (bool) – Reject the import if column headers differ.

  • match_existing_rows (bool) – Match incoming rows to existing rows by key.

  • preserve_ordering (bool) – Preserve the source row order in the target.

set_clear_sheet(clear_sheet)[source]

Clear the sheet before writing imported rows.

Return type:

ImportOptionOverrides

set_reset_decisions(reset_decisions)[source]

Reset decision-variable values for any matched rows on import.

Return type:

ImportOptionOverrides

set_expected_column_count(expected_column_count)[source]

Set the column count enforced when match_column_count is True.

Return type:

ImportOptionOverrides

set_key_column(key_column)[source]

Set the column used to match incoming rows against existing ones.

Return type:

ImportOptionOverrides