Excel Link connects Microsoft Excel to SapphireOne using the SapphireOne Gateway system.
The connection method depends on the operating system.
Platform
Connection Method
Windows (PC)
SapphireOne TCP/IP link
macOS (Mac)
SapphireOne Apple Events
Excel and SapphireOne may run:
• On the same computer (PC or Mac) • On different computers across the network (PC only)
This Technical Note applies to:
• Excel 2016 (Windows) • Excel 2016 (Mac)
Developer note Excel Link effectively exposes SapphireOne data through a function library accessible from Excel formulas. This allows financial modelling, external reporting and spreadsheet automation while still pulling live data from SapphireOne.
Compatibility Note (32-bit vs 64-bit)
Modern operating systems are moving away from 32-bit software.
If Excel Link fails to work correctly it is often because the required components are the wrong architecture.
Important points
• macOS Catalina and later require 64-bit compatible files • Ensure the Excel add-ins and support libraries match the architecture of the operating system • Windows environments may still run 32-bit Office installations
Typical symptom of architecture mismatch
• Excel loads but functions return errors • Excel add-in does not appear in Function Manager • Gateway commands fail to execute
Prerequisites
Before installation confirm:
• The required DLL files and Excel add-in (.XLA) files are available • The IP address of the SapphireOne server is known • The SapphireOne Gateway Port number is known
1 total value 2 total cost 3 margin 4 total quantity 5 maximum value 6 minimum value 7 average value 8 maximum cost 9 minimum cost 10 average cost 11 maximum margin 12 minimum margin 13 average margin 14 maximum sale price 15 minimum sale price 16 average sale price
Transaction type options
Code
Meaning
A
All sales
S
Sales only
C
Sales credits
P
Purchases
OS
Sales orders
OV
Purchase orders
InventoryB
Purpose Extended filtering version of InventoryA.
Additional filters include:
• Client • Client class • Client area • Inventory class • Project class
Returns negative values when inventory is consumed as a component.
[TOGGLE: END]
[TOGGLE: START InventoryC Command]
Purpose Returns status values for an inventory item.
Syntax
InventoryC(InventoryID,InventoryClass,Type)
Type values
1 Current 2 On Order 3 Backorder 4 Allocated 5 Opening 6 Standard Price 7 Average Cost 8 Last Cost 9 Sales MTD Qty 10 Sales MTD Value 11 Purchases MTD Qty 12 Purchases MTD Value 13 Not listed in original table 14 Sales TTD Qty 15 Sales TTD Value 16 Purchases TTD Qty 17 Purchases TTD Value 18 Duplicate entry in original documentation 19 Order Quote Qty 20 Order Quote Value 21 Purchase Quote Qty 22 Purchase Quote Value 23 Price A 24 Price B 25 Price C
Developer note InventoryC is often used for operational dashboards.
Purpose Returns the value of a specific field in an inventory record.
Syntax
InventoryS(InventoryID, FieldNumber)
Developer note InventoryS acts as a direct field reader for the inventory table.
To make the large field list easier to navigate it has been grouped into logical categories.
Core Fields
ID Name Class LK Units Weight Height Width Location Stocktake
Stock Quantities
Current On Order On Backorder Allocated Unposted Opening
Pricing and Cost
Std Sale Price Average Cost Cost Type Last Cost Last Date In Minimum Maximum
Accounting
GL Sales Acc GL Cost of Sale GL Asset Acc GL Variance Acc
Operational Fields
Vendor Lead Time Cost Weighting Current Cost Decimals Stock Value
Audit Fields
Created By Modified Mod By Last Mod Last Mod Time
Additional Inventory Fields
Prices Sub Notes Analysis MTD Sales Qty MTD Sales Val MTD Purch Qty MTD Purch Val MTD COS TTD Sales Qty TTD Sales Val TTD Purch Qty TTD Purch Val TTD COS
User Defined Fields
UDF1 UDF2 UDF3 UDF4
Extended Metadata
Keywords Tax Code Tax Rate Later6
Additional Reporting Fields
MTDB Sales Qty MTDB Sales Val MTDB Purch Qty MTDB Purch Val MTDB Cos TTDB Sale Qty TTDB Sales Val TTDB Purch Qty TTDB Purch Val TTDB COS
System Fields
INTERNALS Include Sales TableA TableB TableMaster
Advanced Fields
UPC Second ID Calc Write Pict
Inventory Workflow Fields
Order Value Back Value Ord_Quote_Qty Ord_Quote_Val Pur_Quote_Qty Pur_Quote_Val