Hi!
Is it possible to run or execute a Macro Code in x++? I just want to execute a Macro code (Inserting new row) using x++. I tried this code but its not working and I don’t really know the correct syntax. Can anybody has an idea on how it is being done? please? Thanks!
This is the code I tried:
SysExcelApplication ExcelApp;
SysExcelWorkbooks WorkBooks;
SysExcelWorkbook WorkBook;
SysExcelWorksheet Worksheet;
;
ExcelApp = SysExcelApplication::construct();
ExcelApp.displayAlerts(true);
ExcelApp.visible(true);
ExcelApp.workbooks().open(“SomeExcelFile.xls”);
Workbook = ExcelApp.workbooks().item(1);
Worksheet = Workbook.worksheets().itemFromName(“WorkSheetName”);
ExcelApp.comObject().Run(“ActiveCell.Offset(1).EntireRow.Insert”); //---------- I GOT ERROR HERE (Macro Code)
Regards,
AML