m m
Technical Support
OfficeQ Application Programming Interface (API) - Intro
Aug 30, 2015: We are currently rewriting this web site. This page may be useful - but is not yet complete and may contain misleading or incomplete information or inoperative links. Please email support@datablox.com if you have questions or need additional info.

There are two different methods that to get the data from OfficeQ:

In both cases, OfficeQ gets the data from the QuickBooks file in the same way.  Internally, it uses ActiveX Automation to call into the QuickBooks file and saves the retrieved data in memory.  If using AAA, the caller then makes calls to OfficeQ to retrieve the data.  If using the QQT file method, OfficeQ writes the data to a single file, which can be read later.

In the past, OfficeQ only had the ActiveX Automation API available.  Initially, most of our customer used either Microsoft Visual Basic (VB6 or VBA) or C++ to get the data.  These environments (and several others) supported ActiveX Automation well.

The OfficeQ API is written as a single, easy to install and use ActiveX Automation Windows library with 10 API calls. It can be easily called from any programming environment that supports ActiveX Automation.  The scheme used is similar to that typically used in desktop databases.  See OfficeQ Routine Declarations.  Some simple example routines for accessing AAA are at:  Example of Using OLE Automation API from VB or VBA

QQT files were added later as a way to extract the data without making calls through programming code.  With QQT files, a file name is specified and OfficeQ fills that file with all the requested data.  The QQT file format is simple to understand and it's reasonably trivial to parse.  Data can be extracted using any programming environment.  The file can also be transferred to a different operating system (such as Linux) before data is extracted.  See .QQT File Format - Technical Details  Some simple example routines for accessing .QQT files using PHP are at:  Example of Reading a .QQT file using PHP

Our future products, which extract data from QuickBooks Online, will only use the .QQT file format to return the data.  Our goal is to use the identical format, so our customer's code can be reused.

Why not use something simple like CSV files?  OfficeQ extracts over 30 record types - which would each require a separate file.  Some of these record types contain up to 40 different fields - with only a small subset often used.  Even though this approach would work, the extra work involved quickly overshadows the simplicity of CSV files.


ActiveX Automation

We selected ActiveX Automation as the programming environment for OfficeQ for the following reasons:

DataBlox offers inexpensive license agreements for OfficeQ that allow you unlimited distribution to your customers.


Change Resilience

One very important consideration in the OfficeQ API is compatability with past and future versions. Many of our OEM customers don't have the resources to change their programming code every year when newer versions of QuickBooks become available. Because of that, we built in as much 'future compatability' into the API as possible.

New data records as well as new fields to existing data records can be added in newer versions of OfficeQ - even though the older calling program has no knowledge of these new structures.  This also applies to .QQT files.

This enables (for example) software that is installed on our OEM's customer's computers to upgrade to a later version of QuickBooks by only upgrading a single file (OFFICEQ6.EXE). The code written and installed by our OEM does not need to be rewritten or reinstalled.

Recommended Programming Environments

...to do...