CSV Combiner | ๐Ÿ’พ Merge CSV Files with Custom Column Order avatar

CSV Combiner | ๐Ÿ’พ Merge CSV Files with Custom Column Order

Under maintenance

Pricing

from $0.10 / actor start

Go to Apify Store
CSV Combiner | ๐Ÿ’พ Merge CSV Files with Custom Column Order

CSV Combiner | ๐Ÿ’พ Merge CSV Files with Custom Column Order

Under maintenance

Combine up to three CSV files into one. Columns are matched by header name, so data stays under the right column even when the files order their columns differently. You choose the output column order.

Pricing

from $0.10 / actor start

Rating

0.0

(0)

Developer

Mando

Mando

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Share

๐Ÿงฉ CSV Combiner

Combine up to three CSV files into one. Columns are matched by their header name, so every value stays under the correct column even when the files list their columns in a different order. You decide the final column order.


๐Ÿ“Œ What it does

You have two or three CSV exports that hold the same kind of data but do not line up. One file has Name, Email, Domain, another has Domain, Email, Name, a third uses lowercase email. Pasting them together by hand mixes the data under the wrong headers.

This actor:

  1. Reads each file by its header names, not by column position.
  2. Matches columns across files (matching is not case-sensitive, so Email, EMAIL, and email are the same column).
  3. Stacks every row into one combined CSV, each value placed under its correct header.
  4. Writes the output in the column order you choose.

No row is removed. Every row from every file ends up in the output.


๐Ÿ“ฅ Input

Input CSV Files

FieldRequiredNotes
๐Ÿ“„ CSV 1YesThe first file.
๐Ÿ“„ CSV 2NoOptional second file.
๐Ÿ“„ CSV 3NoOptional third file.

You can run with 1, 2, or 3 files. Files do not need the same columns or the same column order.

๐Ÿงฉ Output Column Order

A single dropdown controls the column order of the combined output:

  • ๐Ÿ“„ Use CSV 1 / 2 / 3 column order - the output follows that file's header order. Any column that exists only in the other files is added at the end, with an extra_ prefix on its name (for example extra_Phone). Nothing is dropped.
  • โœ๏ธ Custom order - you type the exact column order you want in the text box below the dropdown.

โœ๏ธ Custom Column Order

Used only when Custom order is selected. Write the column header names you want, one per line (press Enter between each, no commas):

Name
Email
Company
Domain

Rules for custom order:

  • Order is exactly what you type, top to bottom.
  • Matching is not case-sensitive. Typing email matches a Email column.
  • The output keeps the original header casing from the file, not what you typed.
  • Any combined column you do not list is dropped from the output.
  • Any name you type that matches no column is skipped and reported in the log.

๐Ÿ”— How columns are matched

Matching is by header name, lowercased and trimmed:

CSV 1 headerCSV 2 headerTreated as
Emailemailone column
Domain domainone column
Job Titlejob titleone column

When a file is missing a column that another file has, that cell is left blank for the rows from the file that lacks it.


๐Ÿ“Š Log

The log opens with a short summary so you can see what happened before you download anything.

CSV 1 / 2 / 3 order:

๐Ÿ“ฅ Loaded CSV files:
CSV 1: 500 rows, 12 columns
CSV 2: 320 rows, 10 columns
CSV 3: 150 rows, 14 columns
๐Ÿงฉ Combined rows: 970
๐Ÿ“Š Column analysis (across all files):
Total unique columns: 20
Columns with data: 15
Empty columns: 5
Empty: Fax, Middle Name, Region, Notes, Suffix
๐Ÿ“‹ Output column order: CSV 1
12 columns from CSV 1, in its order
+ 8 extra column(s) from the other files, appended with the "extra_" prefix:
extra_Phone, extra_LinkedIn, extra_Title, ...

Custom order:

๐Ÿ“Š Column analysis (across all files):
Total unique columns: 20
Columns with data: 15
Empty columns: 5
๐Ÿ“‹ Output column order: Custom (14 columns)
Order: Domain, Name, Email, Company, ...
โš ๏ธ 1 name(s) in your list matched no column and were skipped: emial
โŒ 6 column(s) dropped (not in your order): Fax, Region, Notes, Phone, Suffix, Middle Name
Of those, 1 held data: Phone
  • Total unique columns: how many distinct columns exist once all files are combined.
  • Columns with data: how many of those hold at least one non-empty value. The rest are blank in every row.
  • Dropped (custom order only): columns not in your list. The log also tells you how many of the dropped columns actually held data, so you know if you lost anything that mattered.

๐Ÿ“ค Output

  • Dataset: the combined rows, viewable as a table in the Apify console and available through the API.
  • Key-value store, key OUTPUT: the combined CSV file, in the exact column order you chose, with original header casing. Download this for the clean file.

The output download link is shown on the run's Output tab.


๐Ÿ“‹ Example

CSV 1 (Name, Email, Company, Domain)

NameEmailCompanyDomain
Alicealice@acme.comAcmeacme.com

CSV 2 (Domain, Company, Email, Name, Phone) - different order, extra Phone

DomainCompanyEmailNamePhone
globex.comGlobexcarol@globex.comCarol555-0100

CSV 3 (email, name, title) - lowercase headers, extra title, no company or domain

emailnametitle
eve@umbrella.comEveCTO

Output column order: CSV 1

NameEmailCompanyDomainextra_Phoneextra_title
Alicealice@acme.comAcmeacme.com
Carolcarol@globex.comGlobexglobex.com555-0100
Eveeve@umbrella.comCTO

Carol's data came in as Domain, Company, Email, Name, Phone but still lands under the right headers. Eve's lowercase email matched Email, and her title was appended as extra_title.


โš ๏ธ Notes

  • Matching is case-insensitive and ignores leading and trailing spaces in headers.
  • If two columns inside the same file share a header name, only one is kept for that file.
  • No rows are removed. Duplicate rows across files are all kept.
  • Empty CSVs, or files with no header row, are skipped with a warning. The run continues with the remaining files.