Documents & OCRPractical guides

Merge Excel files with different column names

When two reports call the same field Store and Branch, map both to one column before appending their rows. This guide shows the input and merged result, then walks through a downloadable store-report example. Start with your own files or try the sample; use a keyed join instead if you need to add information by an ID.

turned on black and grey laptop computer
Illustrative photo: Lukas Blazek · Unsplash License

What changed: Rewrote the title and opening, brought the two-file merge comparison forward and separated own-file processing from the sample workflow; retained the original case, sources and publication date.

Key Takeaways

For a one-off merge, confirm that the fields mean the same thing, map their headers to one output name and append the rows. Keep source information and compare input and output counts. This route combines cell values; recurring refreshes, workbook formulas and formatting need the separate choices explained below.

See the merge before you start

These are excerpts from the same fictional store exercise used throughout this guide. Each source has four records. The table shows how the two differing headers line up; it does not imply that raw amount text is already ready to sum.

Two source excerpts mapped into the same output columns
SourceInput headersExample inputOutput Store / Amount
North CSV · 4 rowsStore / AmountNorth / 1,000North / 1,000
South CSV · 4 rowsBranch / SalesSouth / 700South / 700

What a correct append looks like

Before

4 North rows + 4 South rows; Store/Branch and Amount/Sales differ.

After mapping

8 rows; both sources use Store and Amount. Keep provenance and every record.

Do not import the reference-totals file as a third source. The later cleaning and period steps verify 3,000 → 3,600; the merge alone does not establish that total.
In this article

A one-off delivery or a report you refresh every week?

For an occasional delivery of differently structured files where cell values are sufficient, manually align headers and append in KitNelo. For recurring reports collected in one folder with a consistent structure, consider a repeatable query. Microsoft’s file-combination documentation uses files sharing a schema. The choices below are editorial workflow advice, not a speed test or promised outcome.

If one table contains order lines and another contains store managers, you need to enrich each line using a store key. Appending creates extra sales-like rows instead. Join the tables and check for one-to-many expansion. Append, join and aggregate answer different questions even when interfaces use similar names.

Choose by update pattern and intended output
Your taskConsiderStill resolve
One delivery; equivalent headers with different namesManual mapping, then append: this guideSemantic equivalence and excluded files
Weekly update; one folder and consistent structurePower Query transformation and refreshSchema changes, errors and output checks
Add reference information by IDA keyed join, rather than appendKey uniqueness and expanded row counts
Retain macros, formulas and workbook layoutWork within the original workbook processKitNelo merges values, not these objects

Define five fields before renaming headers

The exercise contains two source CSVs, reference totals and instructions. Import the sources only; the answer file is not a transaction input. Each source contains four records. Eight means data records, excluding headers and ignoring line breaks inside a quoted note. Record file names, sheets and expected counts in an input manifest.

Identical names do not establish identical meaning. Order amount and cash received can differ because of discounts, refunds or timing. Keep them separate until the definition is confirmed. Microsoft documents header-based appending. KitNelo likewise requires reviewed mappings, but does not run or save a Power Query query.

The store exercise uses the same business definitions in both sources
Source headerOutput headerMeaning to confirm
Record IDRecord IDRetain 0011 as text, not a numeric amount
DateDateTransaction date, not upload date
Store / BranchStoreThe same store dimension; trim whitespace later
Amount / SalesAmountThe same amount unit; this sample has no refunds
NoteNoteA quoted line break stays inside one record

Import, map and preview: accept the append step first

Quoted commas and line breaks do not create extra fields or records. If the input is already misparsed, follow the CSV and JSON structure checks first. Renaming headers cannot repair a record that was split incorrectly.

  1. Extract the store pack and import its two source CSVs. Confirm the sources and four records in each. UTF-8 CSV, TSV and XLSX are supported; a ZIP is not itself a spreadsheet input.
  2. Review the mappings and set Branch→Store and Sales→Amount. Keep other equivalent fields under their common names. Clearing an output name excludes the column; it does not insert a blank value.
  3. Retain source file, sheet and row information. Select no deduplication key, then preview. All eight exercise records should remain, with amounts from both sources in the same output field.
  4. If you see nine or eleven records, or amounts split between two fields, return to inputs and mappings. Eight rows establish the append structure; they do not establish that amounts are ready to sum.

Continue through cleaning and check the 3,600 total

These are editorial exercise figures, not customer outcomes or site performance. Continue from the merge into cleaning. Trim Store and normalize Amount, removing thousands separators. Keep Record ID as text. The sample has neither refunds nor duplicates to remove. Preserve signs and confirm policy if real inputs contain negatives; do not delete records merely to demonstrate deduplication.

Review the cleaning preview and explicitly adopt it as the next input before continuing to period reporting. Select the date, store and amount fields. Sum amounts for baseline 2026-10-01 through 10-07 and current period 10-08 through 10-14. Use transaction dates, and confirm that the next step received the adopted result.

Expect totals of 3,000→3,600: a change of 600 and 600÷3,000=20%. North changes from 1,800 to 2,400; South remains at 1,200. Check both the total and groups before downloading. For missing keys or conflicting duplicates, use the separate composite-key exercise.

Accept each stage separately and return to the first unexplained difference
CheckpointExpectedInvestigate first
AppendEight records, both sources presentAnswer imported, sheet omitted or note split
CleaningEight records, usable amounts, 0011 retainedNumeric conversion on every field or accidental deduplication
Period totalBaseline 3,000; current 3,600Date windows, adopted input and amount mapping
Store groupsNorth +600; South unchangedStore whitespace or a missing source

Trace the first discrepancy from an input manifest

List each file, selected sheet, expected data-row count, subtotal presence and date-field definition. The sample has two source CSVs with four records each: eight in total. expected-totals.csv is the answer, not a third input. Separate subtotal rows from transaction details in real files or the same amount can be counted twice.

Pause cleaning and comparison when counts disagree. Find missing or extra sources first, inspect mappings second, and review types third. Matching money totals can conceal a substituted record of equal value, so compare identifiers and source rows too. Deliver the manifest with the final XLSX so next week’s data changes can be distinguished from processing changes.

Narrow the cause before running another merge
SymptomInspect firstRepair
The eight-row sample becomes eleven rowsWere the three answer rows imported too?Remove the answer source and regenerate
Half the amounts are blankAre Amount and Sales still separate columns?Align the fields; do not fill blanks with zero
Money total is roughly doubledDo transaction details include subtotals?Identify subtotal sources, exclude explicitly, recalculate
0011 becomes 11Source values and CSV type inferenceReturn to preserved source text and import as Text

Write the expected three rows before merging

In this invented sample, file A has ID, Name and Team. File B uses Employee for the person’s name and has ID, Employee and Phone, but no Team. After confirming that Name and Employee mean the same thing, map B’s Employee to Name. The output needs ID, Name, Team and Phone, plus enabled provenance fields. It should not invent a Team for B’s record.

Appending by header produces three records. ID 0007 appears in both files and is retained twice by default. The rows may be complementary data or different batches; visual similarity cannot settle that. If the goal is to enrich A’s existing person record with a phone number, perform a separate keyed join instead of expecting append to merge individual cells.

Invented sources and expected output without deduplication

Two sources

A.csv ID,Name,Team 0007,Ada,North 0008,Bo,South B.csv ID,Employee,Phone 0007,Ada,5550107

Rows after header alignment

ID,Name,Team,Phone 0007,Ada,North, 0008,Bo,South, 0007,Ada,,5550107

Only business columns are shown. Enabled provenance adds source file, worksheet and row. Missing columns remain blank; append does not enrich cells.

Mapping and deduplication do not resolve conflicting records

If one source sheet has both Name and Employee, mapping both to the same output Name is rejected. Determine whether they mean employee and manager, or genuinely duplicate fields, before assigning separate names or explicitly excluding one. Aligning synonyms across files differs from overwriting two columns in one row.

Deduplicating the three illustrative rows on ID alone keeps the first encountered complete key and removes the later 0007, including its phone number. It does not build the most complete record cell by cell. Rows with any missing key component remain, so blank IDs have not been deduplicated. A keep-latest policy requires a reviewed version priority; first encountered does not establish newest.

Retain provenance and account for the change as 3 = 2 retained + 1 removed to identify the lost row. If a phone disappears, return to the undeduplicated output and resolve the conflict instead of manually inserting an untraceable value into the damaged result.

Choose output for the intended handoff

XLSX exports store cell values as text, which helps preserve leading-zero identifiers. CSV retains characters too, but Excel may infer numeric types when you open it directly; import identifiers as text. Exports do not preserve original workbook formatting, pictures, macros or formulas. Formula cells need saved calculated values in the source.

A batch allows up to 30 files and 50 MB total, with 10 MB per file, 50,000 rows, 200 columns and one million cells. Field-based splitting supports up to 200 groups as a CSV ZIP. Inputs and the preview belong to the current page session: download or explicitly save the result.

To turn the merged table into notices or certificates, follow the Excel-to-Word template workflow and check mappings again. Source columns help trace a wrong document value back to its original record.

Common questions

Can files with different column orders be combined?

Yes, align confirmed output column names rather than positions. You still need to check their business meanings.

Are duplicate rows removed by default?

No. Records are retained unless you choose deduplication fields. Records with blank key values remain for review.

Are Excel formulas and formatting retained?

No. Exports contain cell values; formulas need saved calculated results in the input. Original formatting, images and macros are not retained.

Further reading & sources

Put the guide into practice

Open the relevant tool, preview the result and check your exported file.

Newer articles on this topic

Continue with a newer article that refers to this guide or explainer.