Switch to dark theme

Rust API

Read QuickBooks Desktop (.qbw) company files in Rust without QuickBooks or a database server.

TOML
[dependencies]
qbw = "=202611.24.0"

Quick start

Rust
use qbw::Company;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let company = Company::open("company.qbw")?;
    let accounts = company.accounts()?;
    let parts = accounts.named("Sales:Parts").ok_or("account not found")?;
    println!("{} ({})", parts.name, parts.account_type);

    let as_of: qbw::chrono::NaiveDate = "2024-06-30".parse()?;
    let sheet = company.balance_sheet(as_of)?;
    println!("Assets: {}", sheet.assets.total);
    println!("Net income: {}", sheet.equity.net_income);
    Ok(())
}

Reference

Page Covers
Company & Database Access Opening files, reading raw rows and sa17, company profile, preferences, Money, and date ranges
Accounts, Lists & Stock Chart of accounts, names, items, stock on hand, valuation, open orders, and supporting lists
Transactions, Ledger & Links Querying transactions, reading forms and lines, general ledger postings, registers, and links
Reports, Aging & Checks Financial statements, subledgers, open items, AR/AP aging, overviews, and balance checks
Errors & Partial Reads qbw::Error, MoneyError, LeftOut, Damage, and Problem

Examples

Runnable examples are in rust/qbw/examples/: