CSV Combiner | ๐พ Merge CSV Files with Custom Column Order
Under maintenancePricing
from $0.10 / actor start
CSV Combiner | ๐พ Merge CSV Files with Custom Column Order
Under maintenanceCombine 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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
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:
- Reads each file by its header names, not by column position.
- Matches columns across files (matching is not case-sensitive, so
Email,EMAIL, andemailare the same column). - Stacks every row into one combined CSV, each value placed under its correct header.
- 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
| Field | Required | Notes |
|---|---|---|
| ๐ CSV 1 | Yes | The first file. |
| ๐ CSV 2 | No | Optional second file. |
| ๐ CSV 3 | No | Optional 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 exampleextra_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):
NameCompanyDomain
Rules for custom order:
- Order is exactly what you type, top to bottom.
- Matching is not case-sensitive. Typing
emailmatches aEmailcolumn. - 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 header | CSV 2 header | Treated as |
|---|---|---|
Email | email | one column |
Domain | domain | one column |
Job Title | job title | one 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 columnsCSV 2: 320 rows, 10 columnsCSV 3: 150 rows, 14 columns๐งฉ Combined rows: 970๐ Column analysis (across all files):Total unique columns: 20Columns with data: 15Empty columns: 5Empty: Fax, Middle Name, Region, Notes, Suffix๐ Output column order: CSV 112 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: 20Columns with data: 15Empty 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 NameOf 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)
| Name | Company | Domain | |
|---|---|---|---|
| Alice | alice@acme.com | Acme | acme.com |
CSV 2 (Domain, Company, Email, Name, Phone) - different order, extra Phone
| Domain | Company | Name | Phone | |
|---|---|---|---|---|
| globex.com | Globex | carol@globex.com | Carol | 555-0100 |
CSV 3 (email, name, title) - lowercase headers, extra title, no company or domain
| name | title | |
|---|---|---|
| eve@umbrella.com | Eve | CTO |
Output column order: CSV 1
| Name | Company | Domain | extra_Phone | extra_title | |
|---|---|---|---|---|---|
| Alice | alice@acme.com | Acme | acme.com | ||
| Carol | carol@globex.com | Globex | globex.com | 555-0100 | |
| Eve | eve@umbrella.com | CTO |
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.