Instabooks delivers fast read-only PostgreSQL access to QuickBooks Online data. Unlock ledger-backed analytics, agents and applications.
Access your QuickBooks data with all the power of Excel at your fingertips
Download psqlODBC, the official PostgreSQL ODBC
driver, from
postgresql.org.
Take the newest psqlodbc_x64.msi.
x64 file.
Run the installer and accept the defaults. There is nothing to configure — Excel finds the driver by name once it is installed.
Close and reopen Excel, so it picks up the new driver.
In Instabooks, go to Settings → Database Access, open the company you want, and select the Excel (ODBC) tab. Click the copy button on the 64-bit Excel string.
It looks like this:
Driver={PostgreSQL Unicode(x64)};Server=db.instabooks.io;Port=5432;Database=9341452924740861;SSLmode=require;
If you are running the 32-bit build of Excel, copy the 32-bit Excel string instead — it is the same except for the driver name. (Check under File → Account → About Excel if you are not sure; almost every current install is 64-bit.)
Note there is no username in the string. Power Query keeps credentials in its own store and refuses a string that carries one — you will enter yours in step 4.
On the Data ribbon, choose Get Data → From Other Sources → From ODBC.
In the From ODBC dialog, leave the data source name (DSN) as (None), expand Advanced options, and paste your connection string into the Connection string box. Click OK.
Power Query asks who you are. In the panel on the left choose Database — not Default, and not Windows. Enter your Instabooks email as the User name and the password you generated as the Password, then click Connect.
Excel remembers these credentials for this connection. To change or clear them later, go to Data → Get Data → Data Source Settings, pick the connection, and choose Edit Permissions.
The Navigator lists the tables of your books. Click one to preview its rows.
transaction_lines. Tick
Select multiple items to bring in more than one.
Then choose one of:
The result arrives as an Excel table you can pivot, chart, or reference from formulas like any other.
To pull fresh numbers, click Data → Refresh All. The query re-runs against your books, using the stored credentials.
transaction_lines can run to hundreds of thousands of
rows. Loading all of it and pivoting in Excel works, but it is slow
and it makes the workbook large. It is usually better to have the
books do the grouping and hand Excel the summary.
The From ODBC dialog's Advanced options has a SQL statement box below the connection string. Put a query there and Excel loads only its result:
select date_trunc('month', l.date) as month,
a.type as account_type,
sum(l.amount) as amount
from transaction_lines l
join accounts a on l.account_oid = a.oid
where l.date >= '2024-01-01'
group by date_trunc('month', l.date), a.type
order by month, account_type
Tables & SQL has the columns and the query patterns that work here.
transaction_lines. A sum over unfiltered
lines nets to about zero by design. Filter by account type — see
the double-entry note in
Tables & SQL.
More on all of these in Troubleshooting.