Call an Excel macro.
r = xls_CallMacro(macroName, ...)
Excel macro name.
Arguments to pass to the macro.
Must be double, string or boolean scalar variable.
Close the workbook.
xls_NewExcel(); test_path = xls_getRootPath() + 'tests' + filesep() + 'unit_tests' + filesep(); xls_Open(test_path+'xls_CallMacro.xls'); xls_SetWorksheet(1); r = xls_SetData("A1", ""); xls_CallMacro("Sheet1.TestMacro1"); xls_GetData("A1") xls_CallMacro("Sheet1.TestMacro2", "TestMacro2"); xls_GetData("A1") xls_SetSave(%t); xls_Close(); xls_Quit(); | ![]() | ![]() |