This is the deeper, walk-me-through-it version of the Xero-to-Excel onboarding. By the end of the tutorial you will have a small but real workbook: one tab showing your organisations, one tab with a P&L variance table — actuals against budget — that you can refresh next month by changing two date cells.
Nothing is assumed. We cover install, OAuth consent, the first =XO.ORG()formula, the first =XO.BALANCE, the first =XO.BUDGET, and a plain Excel subtraction for the variance column. Each step explains the why, not just the what — so you can build similar models for any account or any period after the tutorial ends.
Already installed and just want the bullet-point version? The quick-start guide is the concise reference for users who have already installed the add-in. This tutorial is for users who are new to the whole idea of live Xero data in Excel.
See what you will build
Picture the finished workbook before we start. It has two tabs:
- Setup — your connected Xero organisations spilled from
=XO.ORG(), plus two date cells (Period Start, Period End). - P&L — five rows, one per account. Columns: account code (you type), Actual (
=XO.BALANCE), Budget (=XO.BUDGET), Variance (=Actual-Budget).
Changing the two date cells on the Setup tab refreshes every row of the P&L tab. Hand the file to next month's analyst, they change the dates, the model is current. That's the entire goal.
- Setup — your connected Xero organisations spilled from
Install XO Report (one minute, no credit card)
From Excel, open the Insert tab, click Get Add-ins, search for XO Report, click Add. Excel installs the add-in into your Office 365 account — it follows you across Excel on Windows, Mac, and the browser.
The trial is 14 days and covers up to 10 organisations — no credit card. If you need more orgs, the Solo plan starts at $9.90/month and the Pro plan at $29.90 covers up to 10. The trial is intentionally generous so you can build the workbook you actually need without hitting limits.
Connect to Xero
Open the task pane: Home tab → XO Report button. The pane appears on the right. Click Connect to Xero — a popup opens for OAuth consent. Log into Xero if needed, approve the scopes (XO Report asks for read-only access; no write permissions).
Once connected, you can authorise as many organisations as the trial / your plan allows. The task pane lists them. Disconnecting an organisation later is one click in the pane settings; XO Report stops fetching from that org and existing formulas return an error until you reconnect or repoint them.
Build the Setup tab with =XO.ORG()
Create a new worksheet, name it Setup. In cell
A1, type=XO.ORG()and press Enter. A two-column table spills starting at A1:Org IDin column A,Org Namein column B, one row per connected organisation.Pick the organisation you want to report on — say row 2 (
A2contains the Org ID like!abc123). Every formula in the workbook will referenceSetup!$A$2(the$signs lock the row absolute so copy-fill behaves).Below the org list, add the date inputs. Suggested layout:
D1= label "Period Start",D2= the date (e.g., 1 March 2026);E1= "Period End",E2= the date (e.g., 31 March 2026). Format the cells as dates so Excel does not treat them as text.Pull your first balance with =XO.BALANCE
Create a second worksheet, name it P&L. In column A list five account codes that exist in your Xero chart of accounts — for example:
A1: Account A2: 4000 A3: 4100 A4: 5000 A5: 6200 A6: 7000In
B1type a header like "Actual". InB2:=XO.BALANCE(Setup!$A$2, A2, Setup!$D$2, Setup!$E$2)Press Enter. The first time it runs, give it a moment — XO Report fetches from the Xero API. The cell shows the activity on account 4000 between your Setup dates. Now fill down: select
B2, drag the fill handle toB6. Every row pulls its own account. Total time: about thirty seconds.Add the budget side with =XO.BUDGET
For variance you also need the budget side. In
C1type the header "Budget". InC2:=XO.BUDGET(Setup!$A$2, "Overall Budget", A2, Setup!$D$2, Setup!$E$2)The second argument is the budget name as defined in Xero. "Overall Budget" is the default name for a single-budget org; if your budget is named differently (e.g., "FY2026 Plan"), use that string. Match it exactly — the lookup is case-insensitive but otherwise literal.
Fill down to
C6. Xero budgets only apply to P&L accounts (Revenue and Expense); Balance Sheet accounts will return 0 because they cannot have a budget. If you see an error, it usually means the budget name does not match — the error message lists the available budget names in your org.Calculate variance and format the table
Variance is plain Excel — no XO formula. In
D1type "Variance". InD2:=B2-C2Fill down. Now format the table: select B2:D6, set the number format to your local currency. Highlight column D and apply Conditional Formatting → Highlight Cells Rules → Greater than with value 0 and format green; repeat with Less than 0formatted red. That's the standard variance colour code.
Test the workbook: change
Setup!E2from 31 March to 30 April. Every B, C, and D cell updates — actuals, budget, variance — for the new period. Hand the file to next month's analyst with one instruction: "change the dates on Setup, the rest follows."Two small polish moves worth doing now. First, freeze the header row on the P&L tab so the column labels stay visible as the table grows (View → Freeze Panes → Freeze Top Row). Second, lock the formula columns to prevent accidental overwrites: select
B2:D6, set Format Cells → Protection → Locked, then enable Review → Protect Sheetwhile leaving the input cells unlocked. The next analyst can edit dates on the Setup tab but cannot break the formulas on the P&L tab.One more sanity check before declaring done. Compare a known cell (say
B2for the first revenue account) against the same line in the Xero P&L report screen for the matching date range. The numbers should match exactly. If they do not, the most common cause is the wrong account code in column A — Xero account codes are case-sensitive strings, not numbers, so"4000"matches but4000as a number may not.
What you just built is the seed of every more elaborate XO Report workbook. The same pattern — Setup tab with org and dates, report tabs that reference Setup absolutely, plain Excel formulas for derived columns — scales to a full board pack with cash flow, KPIs, multi-entity consolidation, and tracking-category slices.
Next steps depend on what you actually need to report on. For specific report shapes, the WS-04 spokes go deeper: see building a Profit & Loss report, building a Balance Sheet, or building a Budget Variance report with multi-month layouts. For the architecture pattern that lets you change one date and watch the whole workbook refresh, see live Xero data in Excel.
Frequently asked questions
- I have already installed XO Report — should I read this or the quick-start?
- Read the quick-start at /docs/getting-started/quick-start — it is the concise reference for users who have already installed and just need the four-step shape. This tutorial is for users new to the whole idea of live Xero data in Excel; it includes more context and a complete worked example.
- What if my Xero organisation does not have a budget defined?
- XO.BUDGET will return an error message listing the available budgets in your org. To follow this tutorial exactly, set up a small budget in Xero first (Reports → Budget Manager → Add Budget). Alternatively, skip the budget side and stop at the actuals — the variance step is optional for the first walkthrough.
- Why does =XO.BALANCE need both a start and an end date?
- For P&L accounts (Revenue, Expense) XO.BALANCE returns the activity between the two dates. For Balance Sheet accounts (Asset, Liability, Equity) it returns the balance as of the end date — the start date is ignored. The function detects which behaviour applies from the account class in Xero, so the same formula shape covers both cases.
- Can I extend this to compare two periods side by side?
- Yes. Add a third column referencing different date cells (e.g., D2/E2 for current period, F2/G2 for prior period). In B2 write =XO.BALANCE(Setup!$A$2, A2, Setup!$D$2, Setup!$E$2) and in C2 =XO.BALANCE(Setup!$A$2, A2, Setup!$F$2, Setup!$G$2). The variance column then becomes a year-over-year or month-over-month delta.
- How do I make a workbook that covers multiple organisations?
- The simplest pattern is one column per entity that references a different row of the spilled XO.ORG() table — Setup!$A$2 for entity 1, Setup!$A$3 for entity 2, etc. For deeper multi-entity patterns including the Consolidation pattern, see the dedicated /xero-to-excel/consolidation spoke.
- Does this workbook refresh when I close and reopen it?
- Yes — Excel recalculates formulas on file open by default (assuming Workbook Calculation is set to Automatic, which it is by default). The XO Report add-in then pulls fresh Xero data for each formula. To force an explicit Xero re-fetch without changing inputs, click the Refresh button in the task pane or press F9.
Related reading
- =XO.BALANCE — Account balance for a date range
- =XO.BUDGET — Budget amount over a date range
- =XO.ORG — List connected organisations
- Build a Budget Variance report in Excel
- Build a Profit & Loss report in Excel
- Quick-start guide (concise reference for installed users)
- How to export Xero to Excel (5 methods compared)
- Live Xero data in Excel (control-cell pattern)
- Scheduled refresh patterns for Xero workbooks