The CXlMacros class contains wrapper functions for almost all the built-in Excel macro functions. The wrapper functions take care of converting arguments and results to and from CXlOper objects.
The built-in Excel macro functions include many useful functions, including:
Method | Description |
---|---|
GetFormula | Returns the contents of a cell as they would appear in the formula bar |
Formula | Enters a formula in the active cell or in a reference |
FormulaFill | Enters a formula in the range specified or in the current selection |
FormulaArray | Enters a formula as an array formula in the range specified or in the current selection |
GetActiveWorkbookName | Returns the name of the active workbook |
GetActiveWorksheetName | Returns the name of the active worksheet |
WorkbookGetWorksheetNames | Returns a list of all the sheets in a workbook |
The names of CXlMacros methods generally reflect their names in the Excel Macro Language (XLM4). This is for the convenience of programmers familiar with the language. If you do not know which is the right method to use, browse the list of methods in CXlMacros methods, and see the detailed examples in the following topics.
See the CallExcel sample for examples of using CXlMacros class.