3.5 KiB
GL Accounts Excel Functions
This document lists the Excel functions currently implemented in the GL Accounts proof of concept.
Common Parameters
All functions use the same four parameters:
companyKey: company party code or company party name, for exampleICT TRADING.accountCode: general ledger account code, for example20011.currencyIso: transaction currency filter. In the current database this may be the currency id, code, name, symbol, or numeric code, for example1,USD, orEUR.valueDate: accounting cutoff date. Only posted moves up to this date are included.
Example parameter shape:
=GetAccountAmount("ICT TRADING","20011","USD",DATE(2026,5,13))
Implemented Functions
GetAccountBaseAmount
=GetAccountBaseAmount(companyKey, accountCode, currencyIso, valueDate)
Returns the account balance converted to the company base currency using the
currency rate at valueDate.
GetAccountRealBaseAmount
=GetAccountRealBaseAmount(companyKey, accountCode, currencyIso, valueDate)
Returns the posted balance already stored in company base currency.
GetAccountAmount
=GetAccountAmount(companyKey, accountCode, currencyIso, valueDate)
Returns the posted balance in transaction currency for the selected currency filter.
GetAccountAbbr
=GetAccountAbbr(companyKey, accountCode, currencyIso, valueDate)
Returns the account abbreviation. In this POC it returns the account code because no separate GL abbreviation field is available.
GetAccountName
=GetAccountName(companyKey, accountCode, currencyIso, valueDate)
Returns the general ledger account name.
GetAccountContact
=GetAccountContact(companyKey, accountCode, currencyIso, valueDate)
Backward-compatible contact formula. It returns contact codes when available, otherwise contact names.
GetAccountContactCode
=GetAccountContactCode(companyKey, accountCode, currencyIso, valueDate)
Returns a comma-separated list of contact party codes found on posted GL lines. If a party has no code, its name is used as fallback.
GetAccountContactName
=GetAccountContactName(companyKey, accountCode, currencyIso, valueDate)
Returns a comma-separated list of contact party names found on posted GL lines. If a party has no name, its code is used as fallback.
Operational Notes
- Only posted account moves are included.
- The currency parameter is currently a transaction-currency filter, not an output currency selector.
- The VBA module caches results. Use
ClearGLApiCacheafter changing database data or SQL functions. - Database calls are disabled after importing the module and after each
refresh. Formula cells return
#GLAPI_OFFoutsideRefreshGLApi. - Use
InstallGLApiFormulason theFunctionssheet to install formulas from formula text into result cells as inert placeholders. Do not remove leading apostrophes manually in Excel's formula bar. - Use
ClearGLApiFormulasif a previous workbook version already contains liveGetAccount...worksheet formulas. - Use
CloseGLApiConnectionto force Excel to reopen the ODBC connection. - Use
RefreshGLApito enable database calls only during that refresh, clear the cache, evaluate formula text, and write plain values. - Use
DisableGLApibefore editing/copying large formula areas if Excel should not contact the database. GetAccountContactremains available so existing workbook formulas keep working.