How to Combine Multiple Order CSV Exports in Google Sheets (Shopify, WooCommerce, Marketplaces)
Merge Shopify, WooCommerce and marketplace order CSVs in Google Sheets with one tested VSTACK formula that matches columns by header name. Step-by-step.
If you sell in more than one place — your own shop, Shopify, a marketplace — you end up with a separate spreadsheet of orders from each one. Putting them together by copy and paste is slow, and it’s easy to make a mistake.
This guide shows you how to combine those files in Google Sheets, so you have one list of all your orders.
In this guide you’ll learn:
- How to import each file onto its own tab.
- How to line up columns that have different names. Each shop labels things its own way.
- How to use one formula that stacks everything into a single table, matching columns by their header names. Next month, you replace the files and the combined table updates by itself.
- How to add up sales by channel.
You don’t need paid add-ons or any coding. You’ll paste one formula, and each part is explained. By the end, you’ll have one sales table you can trust, instead of a pile of separate files.
Who this guide is for
- Online sellers who sell on more than one channel (your own store plus a marketplace, for example) and want one sales table.
- Small business owners and bookkeepers who currently copy and paste CSVs every month.
- Marketers who need total revenue across channels to calculate MER or blended ROAS.
You don’t need Apps Script, add-ons or paid connectors. You will paste one longer formula, and each part is explained.
What you need before you start
- A Google account and a new Google Sheets spreadsheet.
- One order CSV export from each channel, all covering the same date range.
- About 30 minutes for the first setup. Later months take a few minutes.
- Care with personal data. Order exports contain customer names, emails, phone numbers and addresses. Keep the spreadsheet private, and delete the columns you don’t need (see Step 3).
Contents
- Choose your standard columns
- Export the orders from each channel
- Import each CSV into its own tab
- Map each channel’s column names
- Build the combined table with one formula
- Turn every date into a real date
- Summarise revenue by channel with QUERY
- Optional: pull exports from other spreadsheets or URLs
- Common errors
- Troubleshooting checklist
- Alternatives and limitations
- FAQ
Step 1: Choose your standard columns
Each platform names its columns differently, so first decide what the combined table should contain. Keep it short. This guide uses six columns:
| Standard column | Meaning |
|---|---|
channel |
Where the order came from (you type this label, for example "Shopify") |
order_id |
The order number shown in that channel |
order_date |
When the order was placed |
status |
Paid, refunded, cancelled and so on, in that channel’s wording |
revenue |
The order amount you’ve chosen to compare (see below) |
currency |
The currency code |
Decide what "revenue" means before you start. Platforms define their totals differently. For example, Shopify’s export has a Subtotal column (before shipping and taxes) and a Total column (the total cost of the order). Pick the column in each export that is closest to the same definition, and write that choice down. Otherwise your channel comparison won’t compare like with like.
Step 2: Export the orders from each channel
Shopify (from Shopify’s help page on exporting orders):
- In Shopify admin, go to Orders, then filter or sort the orders you need.
- Click Export. In the Export orders window, choose the orders (for example Orders by date with a start and end date), then choose the CSV file format.
- Click Export orders.
Shopify downloads exports of up to 50 orders, or the current page, straight to your device. Larger exports and exports by date are emailed to you and the store owner.
Two things in Shopify’s export affect combining:
- An order with several products takes several rows, one per line item. Shopify says many fields are left blank on the extra rows. Counting rows therefore counts multi-item orders more than once. Check in your own file which columns (such as Total) are blank on the extra rows, because the formula in Step 5 relies on that.
- The export includes personal data columns such as Email, Phone and the billing and shipping addresses.
WooCommerce (from WooCommerce’s Analytics documentation):
- In WordPress, go to Analytics → Orders, and set the date range and any filters.
- Use the Download link at the top right of the report table.
If the report fits on one screen, the CSV downloads immediately. Larger reports are prepared and emailed to the WordPress account that requested them. WooCommerce notes that refunded orders appear as two rows in the Orders report: one on the original order date and one on the refund date. Your status filter needs to handle this (Step 7).
Marketplaces and other channels: most seller centres offer an order export. Column names and file formats vary by platform, country and over time, so open your file and note its exact header names. This guide’s method works with any CSV, because you tell the formula the header names (Step 4).
Step 3: Import each CSV into its own tab
- Open your spreadsheet in Google Sheets.
- Click File → Import and upload the first CSV. Google’s help says the file can’t be password-protected.
- For the import option, choose Insert new sheets. This adds the data as a new tab in your existing spreadsheet.
- For a .csv or .txt file you can choose the separator character. Leave it on Detect automatically. If the columns come out merged, re-import and pick Comma, Tab or a Custom character.
- Confirm the import. Exact dialog wording: to be confirmed with screenshots. The options above are as named in Google’s help page.
- Rename the new tab to something short and stable, for example
Shopify export. Repeat for each channel (Woo export,Marketplace export).
Google Sheets’ import accepts .csv, .tsv, .txt, .tab, .xlsx, .ods and other formats. The other import options include Create new spreadsheet, Replace spreadsheet, Replace current sheet, Append rows to current sheet (adds the data after the last row with data) and Replace data starting at selected cell.
Next month: open the channel’s tab, choose File → Import, and pick Replace current sheet. The tab name stays the same, so the combined formula keeps working. To be tested: whether "Replace current sheet" keeps formulas elsewhere pointing at the tab. We expect it to, because the tab itself isn’t deleted, but we haven’t confirmed it.
Privacy tip: after importing, delete columns you don’t need, such as email, phone and addresses. The combined formula only reads the columns you name, so deleting the others doesn’t break it.
Step 4: Map each channel’s column names
Make a small table (in a notes tab, or just on paper) listing, for each channel, the exact header that matches each standard column. Copy header names character for character, including capitals and spaces.
| Standard column | Shopify export header | Your second channel (example) | Your third channel |
|---|---|---|---|
| order_id | Name |
Order ID |
(your header) |
| order_date | Created at |
Order Date |
(your header) |
| status | Financial Status |
Status |
(your header) |
| revenue | Total (or Subtotal) |
Order Total |
(your header) |
| currency | Currency |
Currency |
(your header) |
| row filter: keep rows where this column is not blank | Total |
Order Total |
(your header) |
The Shopify headers come from Shopify’s documented export structure. The second channel’s headers are an example only, so replace them with the headers in your own file.
The last row matters for Shopify. Keeping only rows where Total isn’t blank drops the extra line-item rows, so each order appears once.
Step 5: Build the combined table with one formula
Create a tab called Combined, click cell A1, and paste this formula. It’s shown for two channels. Edit the tab names and header names to match your mapping from Step 4.
=ARRAYFORMULA(VSTACK(
{"channel","order_id","order_date","status","revenue","currency"},
LET(raw, 'Shopify export'!A1:BZ,
hdr, CHOOSEROWS(raw, 1),
data, FILTER(raw, ROW(raw) > 1, CHOOSECOLS(raw, XMATCH("Total", hdr)) <> ""),
HSTACK(IF(CHOOSECOLS(data, 1) <> "", "Shopify", ""),
CHOOSECOLS(data, XMATCH({"Name","Created at","Financial Status","Total","Currency"}, hdr)))),
LET(raw, 'Store B export'!A1:Z,
hdr, CHOOSEROWS(raw, 1),
data, FILTER(raw, ROW(raw) > 1, CHOOSECOLS(raw, XMATCH("Order Total", hdr)) <> ""),
HSTACK(IF(CHOOSECOLS(data, 1) <> "", "Store B", ""),
CHOOSECOLS(data, XMATCH({"Order ID","Order Date","Status","Order Total","Currency"}, hdr))))
))
How it works, piece by piece:
VSTACKstacks ranges vertically, one under another. The first range is the header row, written as an array literal in{ }, where commas separate columns.- In each
LETblock,rawis the whole imported tab, andhdris its first row (CHOOSEROWS(raw, 1)). FILTERkeeps the data rows (row number greater than 1) where the chosen "row filter" column isn’t blank. This drops empty rows and Shopify’s extra line-item rows.XMATCH({...}, hdr)finds the position of each header name you listed, andCHOOSECOLSreturns those columns in your standard order. Because the formula looks columns up by name, it still works if a platform reorders its columns.HSTACKadds the channel label as the first column.ARRAYFORMULAaround the whole formula is needed. In our test, without it only the first column filled in, and every other cell showed#N/A.
To add a third channel, copy one LET(...) block, paste it before the final )), put a comma between the blocks, and change the tab name, label and headers.
Our test result (fictional data): 4 Shopify rows (one order with two line items) and 3 Store B rows produced a combined table with a header plus 6 order rows: 3 Shopify and 3 Store B. The line-item row was correctly dropped.
Using comma decimals? If your spreadsheet locale uses a comma as the decimal separator, Google Sheets uses different separators in formulas and array literals (Google’s own VSTACK example uses semicolons, for instance). Adjust the punctuation if Sheets shows a parse error.
Step 6: Turn every date into a real date
In our test, dates from one channel arrived as real dates. Text dates in the style 2026-11-01 10:15:00 +0800 (a time zone at the end) stayed as text. Text dates can’t be grouped or filtered by month.
Add a helper column next to the combined table. In G1 type order_day, and in G2 paste:
=ARRAYFORMULA(IF(B2:B = "", , IF(ISNUMBER(C2:C), INT(C2:C), DATEVALUE(LEFT(C2:C, 10)))))
This keeps real dates as they are (dropping the time part with INT), and converts text that starts with a YYYY-MM-DD date. Select column G and choose Format → Number → Date. In our test the column returned serial numbers (for example 46327 for 1 November 2026) until it was formatted, which is normal.
Check what your own exports’ date text looks like. If a channel uses a different layout (for example 01/11/2026), LEFT(…, 10) and DATEVALUE depend on your spreadsheet’s locale. Test a few rows by hand.
For a month label, use =ARRAYFORMULA(IF(G2:G = "", , TEXT(G2:G, "yyyy-mm"))) in column H. In our test it returned 2026-11.
Step 7: Summarise revenue by channel with QUERY
On a new Summary tab, paste:
=QUERY(Combined!A1:H,
"select A, count(B), sum(E)
where B is not null and D <> 'refunded' and D <> 'cancelled'
group by A
label count(B) 'orders', sum(E) 'revenue'", 1)
- The final
1tells QUERY there is one header row. - Change the
whereclause to match the status values your channels actually use, for example'voided', spelled exactly as they appear in your data. - To split by month, use
select A, H, count(B), sum(E)andgroup by A, H. In our test this returned one row per channel per month.
Our test result (fictional data): Shopify 2 orders and 250 revenue; Store B 2 orders and 195.5 revenue. Both matched the hand calculation after excluding refunded and cancelled orders.
Watch out for mixed data types. Google’s QUERY documentation says each column can hold only one data type. If a column mixes types, the majority type wins and the minority values are treated as null. So if some revenue values arrived as text (for example "RM 120.00"), QUERY silently leaves them out of the sum. Fix those values at the source tab first (see Common errors).
Prefer clicking to formulas? Select the Combined table and use Insert → Pivot table instead, with rows = channel and values = SUM of revenue.
Step 8: Optional: pull exports from other spreadsheets or URLs
- From another Google Sheets file:
IMPORTRANGE("spreadsheet_url", "Sheet1!A1:Z")imports a range from another spreadsheet. The first time, Google prompts you to allow access between the two files. Google’s best practices recommend limiting the number of IMPORTRANGE chains, because each receiving sheet has to read from the source. You can use IMPORTRANGE as therawrange in aLETblock. - From a CSV published at a URL:
IMPORTDATA("https://…/orders.csv")imports .csv or .tsv data from a URL. Don’t use it for exports that contain customer data unless the URL is private and access-controlled.
To be tested: neither IMPORTRANGE nor IMPORTDATA was part of our test run.
Common errors
| What you see | Cause | Fix |
|---|---|---|
Only the first column fills in; the other cells show #N/A |
The formula isn’t wrapped in ARRAYFORMULA (seen in our test) |
Wrap the whole formula in ARRAYFORMULA( … ) |
#VALUE! from CHOOSECOLS |
A header name in your list doesn’t exist in that tab, for example a typo or a renamed column (seen in our test with "Order Totals") | Copy the header from the file exactly, including capitals and spaces |
| Orders counted twice | Line-item rows weren’t filtered out, or the same CSV was imported twice | Check the row-filter column (Step 4). Use Replace current sheet rather than appending, unless you’re sure. |
| Revenue sums are too low | Some values are text (currency symbols, thousands separators), so QUERY treats them as null | Re-import with the separator set correctly. Use Format → Number, or remove symbols with Find and replace. |
| Dates won’t group by month | The dates are text | Use the Step 6 helper column |
| Refunds counted as sales | Status filter missing, or refunds appear as separate rows (WooCommerce) | Filter by status. Decide whether to show gross or net revenue, and document the choice. |
| Totals look wrong across currencies | Channels report in different currencies | Add a currency conversion step, or summarise by currency too |
Parse error |
Locale uses different separators | Swap commas for semicolons (or vice versa) as your locale requires |
Troubleshooting checklist
- Do all tab names in the formula match exactly, inside single quotes when they contain spaces?
- Is the header in row 1 of every export tab? If a file has title rows above the header, delete them after importing.
- Does every header name in your
XMATCHlists exist in that tab? - Is each
rawrange wide enough to include all the columns you need (A1:BZcovers 78 columns)? - Did you import the same date range from every channel?
- Are the revenue cells numbers? Select one and check the alignment and the number format.
- Is the file getting slow? Delete unused columns from the export tabs, and avoid whole-sheet references in many separate formulas.
Alternatives and limitations
- Copy and paste: fine once, but error-prone every month. This method replaces it.
- A pivot table instead of QUERY: easier to click through, same data.
- Looker Studio: connect the Combined tab as a data source for charts and a dashboard.
- Direct WooCommerce-to-Sheets exports: these avoid the manual CSV step for WooCommerce orders.
- Apps Script or paid connectors: they can automate imports, but involve code, permissions or subscriptions. We don’t recommend a specific connector and have no affiliate relationships.
- Limits: Google Drive’s help page lists a maximum of 20 million cells or 100 MB for a spreadsheet created in or converted to Google Sheets (checked 12 November 2026). Large stores with many line items reach heavy files sooner than you’d expect, so delete columns you don’t need.
- Accounting: this is for marketing and management reporting, not bookkeeping or tax. Your accounting system remains the source of truth.
FAQ
Can I combine CSVs without any formulas?
Yes. Import each file with Append rows to current sheet into one tab. This only works if every file has identical columns in the same order, and you’ll need to delete the repeated header rows.
Will the combined table update automatically?
Yes, when the data in the export tabs changes. You still need to export and import new CSVs yourself, unless you automate that step.
Do I need VSTACK, or can I use { ; } array literals?
In an array literal, semicolons start a new row. In our test, ={'Store B export'!A1:E1; 'Store B export'!A2:E4} stacked the header and rows correctly. Each block should have the same number of columns. VSTACK is easier to read and is what the main formula uses.
Can I combine CSVs with different column orders?
Yes. Because the formula finds columns by header name with XMATCH, column order doesn’t matter, but the header names do.
Is it safe to keep customer data in Google Sheets?
Keep the file private, share it only with the people who need it, and delete personal columns you don’t use. Your obligations depend on your local data-protection law.
Official references
- Google Docs Editors Help: VSTACK, HSTACK, CHOOSECOLS, CHOOSEROWS, XMATCH, LET, FILTER, ARRAYFORMULA, QUERY, Using arrays in Google Sheets, Import data sets & spreadsheets, IMPORTRANGE, IMPORTDATA
- Google Drive Help: Files you can store in Google Drive
- Shopify Help Center: Exporting orders
- WooCommerce: Analytics and Sales Reports, Orders Report
Next step
With all channels in one table, you have the "total revenue" figure you need to calculate MER and blended ROAS. Read our guide to ROAS, MER and break-even ROAS next, then turn the Combined tab into a simple dashboard.
If you receive a fresh export every week, start by setting up n8n to watch your Google Drive export folder. That detects new uploads; you still need a separate workflow step to parse each CSV and load its rows into the source tabs. Keep the Google Sheets formula above for combining those tabs.
Last updated: 13 November 2026



