XO.COA
Get the Chart of Accounts for an organization. By default returns only Active accounts. Returns a table with 12 columns that spills into Excel.
Syntax
Parameters
| Parameter | Required | Description |
|---|---|---|
| org_id | Yes | Organization ID from XO.ORG() |
| include_archived | No | 0 = Active accounts only (default), 1 = Active and archived accounts (excludes deleted) |
Returns
A table with 12 columns:
Examples
Active accounts only:
=XO.COA(A2)Returns a spilling table of all active GL accounts.
Include archived accounts:
=XO.COA(A2, 1)Multi-Organization Support
To get the Chart of Accounts for multiple organizations in a single table, open the Functions tab in the task pane and select multiple orgs. Click "Insert Function" and XO Report will create a VSTACK formula:
The formula uses DROP(...,1) to skip header rows from subsequent orgs.
Troubleshooting
If you see an error, check the troubleshooting guide. XO Report shows standard Excel errors (#VALUE!, #N/A) for connection and data problems. To show a blank or your own message instead of an error, wrap the formula in IFERROR. Hover over the cell to see the specific message.
For a complete overview of building Xero reports in Excel, including how this function fits into a full workflow, see our complete Xero to Excel guide.