Example 1: Run a Macro

To run MySimpleMacro() that requires no arguments, within the worksheet "Sheet1" of "C:\ExcelFiles\Summary.XLS", and not save after running, the following syntax would be used:

ConvertXLS.EXE /S"C:\ExcelFiles\Summary.XLS" /P114 /1"Sheet1.MySimpleMacro" /2 FALSE

 

To run MyAdvancedMacro(), which requires 3 arguments, within the worksheet "Sheet2" of "C:\ExcelFiles\Summary.XLS", and save after running, the following syntax would be used:

ConvertXLS.EXE /S"C:\ExcelFiles\Summary.XLS" /T"C:\ExcelFiles\Summary.XLS" /P114 /1"Sheet2.MyAdvancedMacro" /2 TRUE /3 "Apples" /4 "Oranges"

/5 "Pears"

If your macro is located within a different workbook use this syntax:

ConvertXLS.EXE /S "C:\MyFiles\Sum.XLS" /T "C:\MyFiles\Sum.XLS" /P114 /1"'c:\fullpath\ExcelFileWithMacros.xls'!module1.MacroName" /2 TRUE /3 "Apples" /4 "Oranges"  /5 "Pears"

Notice the single quotes around the full path of the Excel file with the Macros.  These single quotation marks are critical.