CSV Export and Import
CSV is the plain-text option for data exchange with systems that don't understand Excel workbooks.
Exporting
| Menu | Method |
|---|---|
| Direct Costs → Export CSV | ExportDirectCostsToCsvAsync |
| Overheads → Export CSV | ExportOverheadsToCsvAsync |
| Resources → Export CSV | ExportResourcesToCsvAsync |
| Carbon → Export CSV | ExportCarbonEmissionsToCsvAsync |
CsvExportOptions
| Option | Default | Purpose |
|---|---|---|
| Delimiter | , | Use \t for TSV, ; for European locales. |
| IncludeHeaders | true | Column names on the first row. |
| DateFormat | yyyy-MM-dd | ISO by default. |
| DecimalFormat | 0.00 | Controls precision. |
| QuoteAllFields | false | Safer for strings with commas. |
What's Included
CSV is one flat table per export. Custom columns are flattened into additional columns automatically. Hierarchy is preserved via IndentLevel and ParentLineNumber columns.
Importing
| Menu | Method |
|---|---|
| Direct Costs → Import CSV | ImportDirectCostsFromCsvAsync |
| Resources → Import CSV | ImportResourcesFromCsvAsync |
Progress callbacks via IProgress<CsvImportProgress> — shown as a progress bar during large imports.
CsvImportOptions
| Option | Purpose |
|---|---|
| Delimiter | Match the source file. |
| HasHeaders | Skip the first row if true. |
| DateFormat | Parser hint. |
| ConflictResolution | Skip / Overwrite / Rename / Fail. |
| ValidateBeforeImport | Dry-run first, return errors without changes. |
Column Matching
The importer matches columns by header name. Unmapped columns are ignored. Required columns for direct cost import:
ItemQuantity(optional — defaults to 0)UnitRateorResource(one of them)
If both Rate and Resource are supplied, Resource wins and the Rate is updated to match.
Validation
ValidateBeforeImport = true runs ImportResult with:
- Errors (line number, field, message).
- Warnings (non-fatal issues).
- Counts of items that would be created / skipped / failed.
Fix issues in the source file, then re-run with validation off.
Typical Workflow — Annual Rate Update
- Export Resources to CSV.
- Receive updated prices from suppliers / estimating manager.
- Merge into the CSV (Excel is fine for this).
- Re-import with
ConflictResolution = Overwrite. - Cascade applies — every item re-prices.
Limitations
- CSV loses formulas (exports values only).
- CSV loses formatting (bold / colours).
- Carbon export is a separate file (no multi-table CSV).