Accessing Excel Functionality using the C API
Steve Dalton · 2012
This chapter describes accessing of excel functionality using the C API. The Excel4() and Excel4v() API functions provide access to the Excel 4 macro language and Excel's built-in worksheet functions via enumerated function constants. These are defined in the SDK header file as either xlfFunctionName in the case of functions or xlcCommandName in the case of commands. Typically, an Excel function that appears in uppercase on a sheet appears in proper case in the header file. The worksheet function INDEX() is enumerated as xlfIndex and the macro sheet function GET.CELL() becomes xlfGetCell. There are also a small number of functions available only to the C API that has no equivalents in the macro language or on the worksheet. It is possible to define worksheet names as formula strings that Excel will evaluate whenever it is required to make a substitution in a worksheet cell.