Merge monthly CSVs without shifting their columns
Match headers across two monthly exports, remove a repeated row, and verify the final ID and name columns.
To merge monthly CSV exports safely, select Same column names so each value goes under the matching header, then compare the merged row count with the sum of the source rows and inspect a record from the file whose columns are reordered. In the practice files, this gives four rows under id, name and region, with the February copy of 002 still paired with 张三 and APAC. Once you have verified that the repeated record is identical, remove exact duplicates, shape the delivery columns, and reopen the saved file to check the names and identifiers.
What to look for
Use this guide when exports for separate periods belong in one table but their columns arrive in different orders. A result can open successfully while values are under the wrong headings. Watch for a region appearing in the identifier column, a name appearing where the region should be, or a familiar record becoming hard to find in the combined file.
This is also useful when the recipient wants a smaller set of columns than either source includes. The workflow keeps a readable merged preview first, so you can separate the decision to combine files from the decision to drop a redundant record or internal column. If the request is to explain what changed between two snapshots, the related comparison guide produces a difference report for that job.

Why it happens
Each monthly export has a header that assigns meaning to the positions below it. January lists id, name and region. February lists region, id and name. If you paste February’s lines below January’s header, the February value APAC lands under id because it comes first in its source row. Matching by header name keeps an identifier, name and region together even when their positions change. Use actual header text as your basis for matching. Take a deliberate decision about any fields that have different names.
Before you begin
Download customers-january.csv and customers-february.csv from the sample files below. Each contains two data rows and three columns. January has 001/Zoë/EU and 002/张三/APAC. February has the same 002 record plus 003/Mina/EU, with the header order changed. That repeated record gives you a known case to check when you preview duplicate removal.
Keep a copy of each original and name the output separately. Write the target headings down before you start. For this sample, the final handoff needs id and person, using the value of name for person. Region is useful to check the merge and the repeated record, so keep it through that check. If you run the workflow on customer data, use the header names and a small group of records you can inspect without sharing them.
Steps
Import January before February.
In the merge tool below, use Add files to load both sources. If you want to control their order, load the January sample first and then add February. The source names should appear separately in the workspace. With January selected, check that id is the first column and the cells under it read 001 and 002. Select February and look for region first, then id and name. Verify that APAC and 002 occur on the same line in that source. This gives you a reference value to locate after merging.
- If the preview displays unexpected columns or unreadable characters, correct the delimiter or encoding in Import settings & limits and add the source again.
- Base the merge on the preview that actually shows the intended fields.
- A header line and one record on either side of a suspected mismatch usually make the problem easier to isolate.
Match headers and preview the combined table.
Select the two source files under Merge CSVs, set Column strategy to Same column names, and choose Preview merge. The result should contain four data rows under id, name and region. The third row should be 002, 张三, APAC, even though February writes APAC first. The next row should be 003, Mina, EU. The identifier and the other fields should still describe the same record.
- Check another row from January as a control.
- Its 001 record should still carry Zoë and EU.
- This catches both a change in the source order and a mistake that affects only the reordered file.
- csv**.
- Keep that intermediate copy if someone else needs to review how you arrived at the delivery file.
Remove the verified duplicate.
Keep Result preview selected in Active table and choose Remove duplicates in the same workspace session. Leave the column checkboxes empty to compare the whole row, keep First, and select Preview removal. Expect one excluded row and three kept rows. Review that 001, 002 and 003 are present and that 002 still has 张三 and APAC. A full-row comparison is sensitive to all values, so inspect differences when a repeated identifier remains in the table.
- Choose the duplicate rule before editing away any evidence.
- In a separate test, the February 002 record was given a different region.
- Full-row comparison kept all four rows.
- Comparing by id alone kept three and dropped one of the distinct 002 records.
- Use an id-only rule when the business task actually requires choosing one record per identifier, and decide how to choose the survivor.
Make the delivery columns explicit.
With the deduplicated result active, select Edit columns. Rename name to person and exclude region. Check the live result for id followed by person. The rows should be 001/Zoë, 002/张三, and 003/Mina. Use the move buttons when the recipient requested a specific order. If a column was excluded by mistake, restore it in the editor and inspect the preview before downloading again.
- Check the headings along with the values.
- The recipient may have an import rule that expects person, so keeping the right names under the older heading can still break the handoff.
- In the opposite direction, a heading change is safe only when the data under it already represents the same thing.
- The original source tables remain in the session for reference.
Download and reopen the full result.
Set Download format to CSV and use Download full table. Save it under a delivery name, then open the saved file in a text editor or import its identifier column as text. For the practice file, check that the header contains id and person and that the three rows still contain the exact identifier strings. The actual CSV export starts with a UTF-8 BOM and uses quoted fields. In the saved file, Zoë and 张三 were preserved.
- If the recipient requests JSON, download that format from the same result and inspect the array for the same rows.
- Its identifiers remain strings.
- Preview search does not reduce the export.
- In the practice run, searching for Mina displayed one row and the full result still contained all three.
- If the handoff needs a subset, prepare a separate table containing the intended records and check it after export.
Check your result
Reconcile the row counts before checking individual values. January contributes two and February contributes two. The merged copy has four data rows; removing one exact duplicate leaves three. With id and person selected for delivery, the CSV and JSON exports each retain three records with the two requested fields. Count data rows separately from the CSV header.
Open the actual download and look up 002 rather than relying on the preview. It should still be a text identifier with both leading zeros and be paired with 张三. Check that each of the other expected identities occurs once and that no region column remains. When reproducing the exact practice files, use the SHA-256 entries in the measurement record to tell whether the bytes of your download match the reference. Verify keys and values separately if a different export tool writes the same table with different quoting or line endings.
The additional delivery JSON shows the same records in the other export format.
| id | person |
|---|---|
| 001 | Zoë |
| 002 | 张三 |
| 003 | Mina |
Common mistakes
Pasting rows under the first file’s header. Compare the two header orders first. Match columns by name and inspect a February record before you use the combined result.
Removing duplicates by id by default. Inspect which fields differ for the same id. Run a full-row comparison first when your goal is to remove copies, as the changed-region test shows.
Choosing Union to get past a strict error. Check the unmatched names before changing the strategy. In the test variant, choosing Union kept region and note, and the cells for missing columns were empty. Intersection kept id and name and discarded both extra columns.
Reading a filtered preview as the export scope. Check the active table and save a copy with the intended rows. Search in the test hid some rows in the preview, while the saved handoff remained complete.
Limitations
Same-column matching assumes the headers mean the same thing in every source. Review renamed fields, spelling variations and units before you join unrelated exports. The practice run checks a small table. For large sources, confirm the tool’s current file and table limits and split the input into coherent batches if needed.
Test record
On 2026-11-23, we generated and verified the synthetic samples with Veylunex Data Workspace 1.0.0 under Node.js v26.4.0. We repeated the walkthrough in Google Chrome 157.0.8103.80 using a local site build.
The 2-row January and 2-row February sources merged into 4 rows. The complete-row rule excluded 1 row. The saved delivery kept 3 rows under id and person.
The measurement record includes the inputs, output counts or values, error messages, byte sizes and SHA-256 checksums for the public samples.
Tested in
Questions
Can I merge files when their columns are in a different order?
Yes. Use Same column names when every source has the same set of headers, then check a row from the reordered source. In this example the merged values follow January’s header order while retaining the correct February values.
What should I choose if one month includes an extra field?
Use Union if the recipient needs fields from every source. Inspect the empty cells where a source has no matching column. Use Intersection when the recipient wants just the shared fields, and review the discarded columns before exporting.
Which occurrence should I keep when values disagree?
Check what the recipient means by a duplicate. If the rows represent different versions, preserve both until you have an approved rule for selecting the record. If every field is identical, keeping the first occurrence makes the test output predictable.
Will the receiver see the leading zeros?
The practice CSV and JSON contain the original text values, including 001. If the receiver opens a CSV in a spreadsheet, import the identifier column as text, or pass JSON if their workflow accepts it and keeps the string type.