Merging files becomes tricky when different sources don’t share the same headers:
- One file has
Email, another hasemail_address - Columns appear in different orders
- Some columns exist only in certain files
The safest approach is to align by column name and fill missing cells with empty values.
Step-by-step strategy
1) Normalize column names
If you control the upstream export, keep a consistent naming convention:
- Use a single case:
snake_caseorTitle Case - Avoid trailing spaces
- Avoid duplicated headers
If you don’t control upstream files, do a quick pass to rename columns before merging.
2) Build a “master” header list
When merging multiple files, create the union of all headers:
- Start with the first file’s header
- Add any new columns found in the next files
- Keep ordering stable (don’t shuffle columns every time)
3) Re-map each row into the master header
For every row, create an output record where:
- Each master header has a value (or empty string)
- Missing columns become empty
- Extra columns are preserved
This prevents “column drifting” when you import the merged file into other tools.
Oriah Sheet behavior
Oriah Sheet merges CSV and XLSX inputs and:
- Aligns by column name
- Fills missing values with empty strings
- Lets you export as CSV (choose delimiter) and/or XLSX
Common pitfalls to avoid
- Duplicate header names:
nameappearing twice causes ambiguity. - Whitespace issues:
EmailvsEmailare different columns. - Mixed encodings: one CSV might be UTF‑8, another Windows‑1252.
If you suspect encoding issues, re-export as UTF‑8 when possible.