Combine bank CSV files with Power Query in Excel for Windows
Updated · 6 min read
Combine bank CSV files only after confirming they belong to the same account, currency and compatible field structure. In Microsoft 365 desktop Excel for Windows, Power Query can assemble a controlled folder into one table while retaining the source filename. Keep a per-file record number as well, so an unexpected row can be traced back before you approve any output.
This is an existing-CSV workflow. LocalExtract is available for extracting a PDF; its desktop app does not provide a queue that converts a folder of PDFs. Combining files also does not remove duplicate transactions or complete reconciliation.
The desktop apps export date, description, and amount as CSV. Open CSV in Excel to save an XLSX workbook. Statement support varies: verify the result against your own PDF.
Define the input set outside the watched folder
Keep untouched source downloads separately. Create a dedicated folder containing only reviewed working CSV copies for one account and currency; put the workbook, exported result, inventory and quarantined files outside that folder and all its subfolders. Use a flat input folder in this workflow. A filename or a three-column CSV alone does not prove account or currency. Record that scope from the actual source documents in an inventory, together with each filename, period, record count and source version or hash.
Before combining, settle each file’s encoding, delimiter and type conventions. The reading-error guide and date/decimal guide cover those separate tasks. Preserve date and amount text until their interpretation is known. Do not mix different conventions and hope the first file’s settings will fix the rest.
Microsoft’s folder-import instructions require compatible schemas and explain that columns are matched by name rather than position. Inspect names and meaning, not merely the number of columns. A debit/credit layout is not the same schema as a single signed amount; a renamed field needs an explicit, verified mapping before entering this input set.
Establish a five-row assembly target
These are three synthetic UTF-8 CSV inputs for invented deposit account SYNTHETIC-A in USD, using comma delimiters and dot decimals. They contain two, two and one data records respectively; each has its own header.
01.csv
date,description,amount
2026-10-01,Fee,-10.00
2026-10-02,Receipt,100.00
02.csv
date,description,amount
2026-10-02,Receipt,100.00
2026-10-03,Supplies,-20.00
03.csv
date,description,amount
2026-10-04,Charge,-5.00
The assembly target preserves all five observations:
| source_file | source_row | date | description | amount |
|---|---|---|---|---|
| 01.csv | 1 | 2026-10-01 | Fee | -10.00 |
| 01.csv | 2 | 2026-10-02 | Receipt | 100.00 |
| 02.csv | 1 | 2026-10-02 | Receipt | 100.00 |
| 02.csv | 2 | 2026-10-03 | Supplies | -20.00 |
| 03.csv | 1 | 2026-10-04 | Charge | -5.00 |
Their net is 165.00 USD under this exercise’s receipt-positive convention. The two +100.00 observations on October 2 remain present. Without further evidence, they could be an overlap or separate receipts; combination alone cannot decide. The inventory periods October 1–2 and October 2–3 flag an overlap requiring the separate duplicate-review workflow.
Build the query with file and record provenance
Use Data → Get Data → From File → From Folder, choose the controlled input folder and select Transform Data first. Filter the file list to approved CSV filenames, the intended folder path and extension before combining. The folder connector includes subfolders; an extension filter alone will not exclude an unrelated CSV stored below the selected folder. The inventory should explain every included or excluded file.
Combine the filtered Content column with the file-combine control, select a representative valid CSV and inspect the sample’s delimiter and header interpretation. Power Query creates helper queries that apply the sample transformation to each file. Check the sample and the final expanded table; do not select “skip files with errors” as a substitute for accounting for missing inputs. These steps follow the documented folder workflow; English menu labels and generated query names may differ in localized or other Excel versions.
In the sample-file transformation, after the header has been promoted and before row filters or sorting, add a one-based index using Add Column → Index Column → From 1. Rename it source_row. Microsoft documents adding an index column. Because this happens inside the per-file transformation, the index restarts for every source. An index added only to the final combined table would not produce the expected within-file references above. This reference counts parsed data records, not raw text lines, and remains meaningful only for that saved source version.
Retain the generated filename field, commonly Source.Name, in the combined query; rename it source_file and ensure the new index is expanded into the output. Inspect those columns before loading: 02.csv must contribute records 1 and 2, not inherit record numbers from 01.csv. Also retain the external account/currency inventory; source filenames do not create those missing bank fields automatically.
Quarantine exceptions instead of concealing them
| Input finding | Action before assembly |
|---|---|
| Zero-byte file | Quarantine and confirm whether the export failed |
| Header but no data records | Record zero observed rows and confirm with the source; do not infer no account activity |
| Debit/credit fields instead of amount | Quarantine until a separate mapping and sign convention are verified |
| A repeated header inside the data | Quarantine the file and repair a working copy with a documented source-record map |
| Another account or currency | Build a separate input set; do not add its amounts to this one |
Do not quietly drop a row because a description resembles a header or a conversion produces an error. Diagnose against the retained source. If a copy is repaired, record the transformation and preserve the original record references. Refresh only when the inventory and input set agree; an empty output caused by skipped errors is not a successful assembly.
Verify a refresh without ingesting your own output
For the three inputs, compare per-file contributions 2 + 2 + 1 = 5, source periods and the five source-record references. Re-run the query against unchanged inputs: refreshing should rebuild the same five observations, not append another five to yesterday’s result. Keep any exported combined CSV outside the input folder so it cannot become an additional source on the next refresh.
Adding a fourth synthetic file with one October 5 payment of −3.00 USD changes the reference result to six observations and 162.00 USD. Review the inventory delta and that new row. A stable total is not a completeness proof, and the earlier overlap still requires its own decision; do not hide it with automatic deduplication during the combine step.
We checked these expected rows, counts, refresh inputs and exception controls with Python’s CSV reader and Decimal arithmetic. Download the synthetic folder cases for exact input strings and expected source references. This is a reference assembly exercise, not an observed run of Excel or its Power Query engine.
The menu workflow here targets Windows desktop Excel. Microsoft publishes a Power Query platform matrix and separate Mac import guidance; do not assume the Windows From Folder commands exist unchanged on Mac or the web.
For a PDF source, LocalExtract processes one PDF at a time locally, including OCR, and exports date,description,amount CSV. It has no desktop batch queue or accounting synchronization. Account services and periodic Pro verification need a network. XLSX is created by saving the CSV as a workbook in Excel. Download LocalExtract if PDF extraction is needed.
Official Microsoft sources checked October 15, 2026. Keep the combined review data separate from a target accounting import file; accepted fields, duplicate handling and account mapping still depend on that specific importer.
LocalExtract Team
We build LocalExtract, a desktop bank statement converter. Questions or corrections? Contact · Editorial policy