Once you have entered the supplier invoices in your spreadsheet and saved it into CSV format; the most disheartening issue could be facing this error message:
"Import Failed: Missing mandatory column header."
At a crucial month-end accounting period, facing a spreadsheet error is the last thing you need.
Xero usually displays this kind of error when it can’t match one or more required fields of the column headings in the first row of your spreadsheet. A missing header, extra space, typo, or capitalization mismatch can cause the import to fail.
To fix the error, first make sure your CSV includes all the column headings Xero requires.
Why Does Xero Reject CSV Imports?
Xero follows specific rules when importing CSV files. It always checks the first row to confirm that the column headings match the required fields. Once they match, you can continue with the import.
Xero marks required fields with an asterisk (*). The mandatory fields in the Xero CSV are:
*ContactName- The supplier/vendor name*InvoiceNumber- The reference number on the bill/invoice*InvoiceDate- The issue date of the bill/invoice*DueDate- The deadline when the payment is due*UnitAmount- Net amount in numbers, no currency signs accepted*AccountCode- The general ledger code that already exists in your Chart of Accounts*TaxType- The exact tax rate as per your Xero settings
(Optional but strongly recommended columns are Description, Quantity, and TrackingName1 / TrackingOption1.)
Before you import, make sure your CSV has all the required columns; each header is spelled and capitalized exactly as shown and the required fields aren't left blank.
The main reasons for this error:
If your spreadsheet looks complete, one of these four common formatting issues is likely the cause:
1. The Stripped Asterisk Trap*
Xero’s official template marks mandatory fields with a leading asterisk (*). If your data was exported from a third-party app or entered manually without the asterisk, Xero’s parser may reject it because ContactName does not match the expected *ContactName.
2. Invisible Trailing Spaces
A space at the end of a header (e.g. "ContactName " or "UnitAmount ") can be the reason for a mismatch. Spreadsheets will strip trailing spaces from cells so a header may appear correct and yet fail the validation.
3. Microsoft Excel Auto-Formatting and Delimiter Issues
Opening and saving CSV files in Microsoft Excel can introduce subtle formatting issues:
- Excel may change commas to semicolons as delimiters, depending on your regional settings.
- It may add an invisible Byte Order Mark (BOM) or wrap headers in extra quotation marks.
- It may strip leading zeros from account codes (for example, changing 0200 to 200), causing mapping failures.
4. Mismatched Schemas (Bills vs. Sales Invoices)
Xero uses different import structures for Bills to Pay (Accounts Payable) and Sales Invoices (Accounts Receivable). If you upload a sales invoice file in the Bills section, or vice versa, Xero may report missing column headers.
The 60-Second Step-by-Step Fix
Follow these steps to clean your file and pass Xero validation:
Step 1: Open Your CSV in a Plain Text Editor
Avoid opening the file in Excel. Instead, right-click the .csv file and open it in Notepad (Windows) or TextEdit (Mac). A plain text editor reveals the raw characters, delimiters, and quotation marks without spreadsheet auto-formatting.
Step 2: Replace Line 1 with the Verified Header String
Delete the first line of your prepared CSV and paste this standard header sequence accepted by Xero:
*ContactName,*InvoiceNumber,*InvoiceDate,*DueDate,Description,Quantity,*UnitAmount,*AccountCode,*TaxType
Step 3: Check Dates and Currencies
Make sure your data rows match the columns:
- Dates: Use the format specified in your regional Xero settings (e.g., DD/MM/YYYY or MM/DD/YYYY).
- Amounts: Remove currency symbols and various separators. Use plain decimals (e.g., 1250.00).
- Tax Labels: Make sure the text in TaxType exactly matches your Xero tax rates (e.g., 20% (VAT on Expenses) or Tax Exempt (0%)).
Step 4: Save with UTF-8 Encoding
In your text editor, select File > Save As. Set the file format to CSV (Comma delimited) and the encoding to UTF-8.
Return to Xero and upload the saved file to resolve the error.
Complete Xero Bill Import Field Reference
Use this reference to ensure each column in your import file meets Xero’s validation requirements:
| Column Header | Status | Format / Validation Rule | Example |
|---|---|---|---|
| *ContactName | Required | Text (Must match or create a Xero contact) | Acme Supplies Ltd |
| *InvoiceNumber | Required | Alphanumeric (Vendor reference number) | INV-2026-104 |
| *InvoiceDate | Required | DD/MM/YYYY or MM/DD/YYYY | 15/09/2026 |
| *DueDate | Required | DD/MM/YYYY or MM/DD/YYYY | 30/09/2026 |
| Description | Recommended | Text describing the specific line item | Server Maintenance - Q3 |
| Quantity | Optional | Number / Decimal (Defaults to 1 if empty) | 1 |
| *UnitAmount | Required | Decimal number (No symbols or commas) | 850.00 |
| *AccountCode | Required | Valid Chart of Accounts numeric code | 400 |
| *TaxType | Required | Exact tax rate label from Xero | 20% (VAT on Expenses) |
Stop Fixing CSVs Manually: Automate Invoice Extraction
Manually retyping line items, checking tax codes, and adjusting column headers for 30 to 50 client invoices each month is slow and error-prone.
To skip spreadsheet troubleshooting, try Sync2Zero.
Sync2Zero uses multimodal AI powered by Google Gemini to extract data from messy invoice PDFs and receipt images, turning them into verified, pre-mapped files:
- No Template Rules: Upload scanned receipts, multi-page PDFs, or digital invoices without creating custom templates.
- In-Browser Verification: Review line items, adjust account codes, and confirm totals in an interactive data grid before exporting.
- Pre-Mapped Xero Schemas: Export clean CSV and Excel files in Xero’s required format on the first try, with no missing asterisks or syntax errors.
- 1 Invoice = 1 Scan: Multi-line invoices never incur credit penalties.


