Forum Discussion
Jackson_L
14 years agoContributor
Hello,
Excel COM objects and DDT Driver objects are completly different and you cannot use the methods of one in the other. So you cannot create a Excel COM object and use DDT driver methods on it.
Using Excel COM, to activate another worksheet, try using the following:
Excel = Sys.OleObject("Excel.Application");
Delay(3000);
Excel.Visible = true;
Excel.Workbooks.Open("G:\\Documentation\\CalCit Excel Files\\2004 Test Data v3 FINAL_new.xlsx").Worksheets("sheet2").Activate;
If you're only using the excel sheet for data driven tests then using DDT drivers would probably be better.
http://smartbear.com/support/viewarticle/11918/
Cheers,
Jackson