Xero invoices in a live spreadsheet

Add the Invoices table to a sheet as a data source named invoices and its 25 columns become names your formulas, pivot tables and charts use. Sheets reads it from your Xero organisation each time the sheet opens or refreshes.

Formulas on this table

=data.invoices.sum(subtotal)
Total subtotal. Adds up the Subtotal column over every row of Invoices.
=data.invoices.sum(subtotal, contact, A2)
Subtotal per contact. With a contact in A2, the total for that one. Fill it down next to a list of them.
=list.invoices(contact)
Every contact, once. Spills the distinct contact values down the column: the row labels for the formula above.
=data.invoices.sum(subtotal, date, ">=2026-01-01")
Since a date. Only rows whose Date is on or after 1 January 2026. Criteria such as ">=", "<" and "<>" work as in any spreadsheet.
=data.invoices.count(id, contact, "<>")
Rows with a contact. Counts the rows whose Contact is not empty.
=data.invoices.avg(tax)
Average tax. avg, min, max, count, countd (distinct) and first work the same way as sum.

Reports that use it

=data.invoices.sum(amount_due_base_currency, ageing, A2)
Receivables ageing. Open invoices in the buckets accountants use (Current, 1-30, 31-60, 61-90, Over 90), in your base currency. Put a bucket name in A2.
=data.invoices.sum(amount_due_base_currency, payment_status, "Overdue")
Overdue invoices. Amount overdue, converted to the base currency with each invoice's own rate.

Columns

ColumnIn formulasType
IDidText
Invoice no.invoice_noText
ReferencereferenceText
DatedateDate
Due datedue_dateDate
ContactcontactText
Contact IDcontact_idText
SubtotalsubtotalNumber
TaxtaxNumber
TotaltotalNumber
Amount dueamount_dueNumber
Amount paidamount_paidNumber
Amount creditedamount_creditedNumber
Total (base currency)total_base_currencyNumber
Amount due (base currency)amount_due_base_currencyNumber
Payment statuspayment_statusText
Days overduedays_overdueWhole number
AgeingageingText
StatusstatusText
CurrencycurrencyText
Currency ratecurrency_rateNumber
Paid onpaid_onDate
Amounts areamounts_areText
SentsentYes / no
Updated atupdated_atDate and time

Other sales tables

Your invoices, live

Invoices, bills, bank transactions and your monthly profit and loss become tables that formulas, pivots and charts read directly, in your base currency.