Combine spreadsheets
combine_spreadsheetsUse this when the user wants to stack or append many spreadsheets into one: "combine multiple csv files into one", "merge 12 monthly excel files", "combine excel files with different column names", "append these exports into one sheet", "combine all sheets into one". Takes 1 to 24 CSV, TSV or .xlsx files (or pasted tables). Aligns columns by identical name, then same name with different case or spacing, then a synonym table (Amt = Amount, Txn Date = Date, Memo = Description), then fuzzy spelling matches that are listed for confirmation; a specific column is not folded into a more general one (Spouse First Name stays separate from First Name). Adds a Source file column, decides day/month order once per file, reads EU number formats, removes total rows and repeated headers (listed), and reports each column decision. Returns an Excel workbook (Combined, Column mapping, Files, Excluded rows, Summary) and a CSV. Does not join files side by side on an ID (use join_spreadsheets) and does not do mail merge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | The spreadsheets to stack, 1 to 24 CSV, TSV or .xlsx files in order, e.g. jan.csv, feb.csv, mar.csv. One workbook alone stacks all of its sheets. | |
| tables | No | Only when no files are attached: pasted tables to stack, e.g. [{"name":"Jan","csv":"Date,Amt\n1/5/2025,12.50"}]. | |
| all_sheets | No | Stack every sheet of each workbook instead of only the first sheet with data. Default: true when a single workbook is given, otherwise false. | |
| column_map | No | Your column decisions: source header -> output column, e.g. {"Amt":"Amount","Txn Date":"Date"}. Overrides automatic matching. | |
| date_order | No | Day/month order for numeric dates: auto (default) decides once per file from the data and says when it had to assume US month/day; MDY or DMY forces it for all files. Example: DMY. | |
| header_row | No | Only if the headings were detected wrongly: the header row number used for EVERY file (counting non-blank rows in a CSV, sheet rows in Excel), e.g. 4. | |
| unify_case | No | Default true: in short category-style columns, spellings that differ only by case (Revenue vs revenue) become the spelling seen first (first file wins); each change is listed. false keeps values as typed. | |
| remove_duplicate_rows | No | Default false: rows identical in every column are counted and reported but kept. true drops the repeats (e.g. overlapping monthly exports). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| rows | Yes | ||
| files | Yes | ||
| tables | Yes | ||
| columns | Yes | ||
| preview | Yes | ||
| excluded | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| duplicates | Yes | ||
| not_merged | Yes | ||
| value_fixes | Yes | ||
| mapping_changes | Yes | ||
| needs_confirmation | Yes | ||
| mapping_changes_total | Yes |