LabTalk Object Type:
The excel object provides script access for running Excel macros and invoking Visual Basic application functions.
Run a Visual Basic application function from Origin. You must supply the correct number of arguments with this method. The method can accept up to five arguments. The workbook containing the Visual Basic application function must be active.
FunctionName is the Visual Basic application function.
Run a macro from Origin. You must supply the correct number of arguments with this method. The method can accept up to five arguments. The workbook containing the macro must be active.
SheetName is the name of the sheet containing the macro. Rangename is the name of the cell on the sheet where the macro starts (for example, C6)
The excel.runRange() method was designed for older versions of Excel macros that were actually included as part of a spreadsheet in a particular cell or range. (Since Excel 5, macros have become VBA code and old-style macros can't be created in new versions of Excel.)
which will activate SheetName and select ExcelRange.
will activate Sheet2 of the (active) Excel workbook and select columns A through F and rows 12 through 25.
New style macros can be run with the excel.run() method.