Hello,
I am trying to add sheet 2 in Microsoft excel 2013, peopletools 8.54 using below peoplecode, system is throwing error as 'OLE Automation error in Excel.Application.Worksheets: ObjectDoMethod: Bad index.(180,161)':
& WORKAPP = CreateObject("COM", "Excel.Application");
ObjectSetProperty(&WORKAPP, "Visible", True);
& WORKBOOKS = ObjectGetProperty(&WORKAPP, "Workbooks");
& WORKBOOKS.Open(&ServerPath);
& WORKBOOKS.add();
&oWorkSheet1 = &WORKAPP.Worksheets("Sheet1");
& oWorkSheet2 = &WORKAPP.Worksheets("Sheet2");
However, the same code is working fine with excel 2007 and peopletools 8.52.
Please help me on this.
Thanks in advance!!