Xero bill lines in a live spreadsheet

Add the Bill lines table to a sheet as a data source named bill_lines and its 26 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.bill_lines.sum(quantity)
Total quantity. Adds up the Quantity column over every row of Bill lines.
=data.bill_lines.sum(quantity, contact, A2)
Quantity per contact. With a contact in A2, the total for that one. Fill it down next to a list of them.
=list.bill_lines(contact)
Every contact, once. Spills the distinct contact values down the column: the row labels for the formula above.
=data.bill_lines.sum(quantity, 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.bill_lines.count(document_id, contact, "<>")
Rows with a contact. Counts the rows whose Contact is not empty.
=data.bill_lines.avg(unit_price)
Average unit price. avg, min, max, count, countd (distinct) and first work the same way as sum.

Columns

ColumnIn formulasType
Document IDdocument_idText
Bill no.bill_noText
DatedateDate
ContactcontactText
Contact IDcontact_idText
Payment statuspayment_statusText
StatusstatusText
DescriptiondescriptionText
Item codeitem_codeText
Account codeaccount_codeText
Account IDaccount_idText
QuantityquantityNumber
Unit priceunit_priceNumber
Discount %discountNumber
Line amountline_amountNumber
Line amount (excl. tax)line_amount_excl_taxNumber
Line taxline_taxNumber
Tax typetax_typeText
Amounts areamounts_areText
Tracking 1tracking_1Text
Tracking 1 optiontracking_1_optionText
Tracking 2tracking_2Text
Tracking 2 optiontracking_2_optionText
CurrencycurrencyText
Line IDline_idText
Updated atupdated_atDate and time

Other purchases tables

Your bill lines, live

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