Parse uploaded file
layerz_parse_fileParses an uploaded Excel/CSV (file_id) deterministically and returns a token-optimized structure: sheet summaries (without sheet_name) or, for one sheet, the detected timeline, suggested_structure (layout, header row, columns), row labels and column headers with samples. A wide sheet is recognised by its period header: a run of at least three consecutive periods (bare years such as 2026, YYYY-MM, Jan 2026, Q1 2026, date cells) in any column, reported as detected_periods and period_range. A raw DATEV EXTF export is detected natively. structure_override re-parses with corrected columns when a ledger is misdetected (a Débit column taken as the value, an account-code column taken as the label) or when a wide sheet has fewer than three period columns (layout: "wide"). The raw binary is not returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | Upload id as returned by layerz_create_upload_url ('f_' + 16 hex chars). | |
| sheet_name | No | Sheet of a multi-sheet workbook. Omitted: sheet summaries only. | |
| structure_override | No | Override auto-detected columns for a long-format/ledger file (e.g. value_column chose "Débit" and dropped credit rows, or an account-code column won the label). Omitted fields stay auto-detected. |