Jessie_li
12 years agoOccasional Contributor
Excel cannot open while DDT.ExcelDriver is opened
Hi,
I got a issue to open excel file while DDT driver is opening, the script is as following. The issue happens only on excel 2007, if you are using excel 2010, everything is fine. Hope anyone could help me to find the reason, thanks in advance.
function test(){
var driver = DDT.ExcelDriver("TestData//test.xlsx","Input-Output",true);
driver.Next();
while(!driver.EOF()){
var filePath = Project.ConfigPath + "\TestData\\" + "test.xlsx";
var excelApp = new ActiveXObject("Excel.Application");
excelApp.DisplayAlerts = false;
var excelWorkBook = excelApp.Workbooks.open(filePath);
driver.Next();
}
DDT.CloseDriver(driver.Name);
}
If test using excel 2007, it will encounter the error:
Excel cannot open the file 'test.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
I got a issue to open excel file while DDT driver is opening, the script is as following. The issue happens only on excel 2007, if you are using excel 2010, everything is fine. Hope anyone could help me to find the reason, thanks in advance.
function test(){
var driver = DDT.ExcelDriver("TestData//test.xlsx","Input-Output",true);
driver.Next();
while(!driver.EOF()){
var filePath = Project.ConfigPath + "\TestData\\" + "test.xlsx";
var excelApp = new ActiveXObject("Excel.Application");
excelApp.DisplayAlerts = false;
var excelWorkBook = excelApp.Workbooks.open(filePath);
driver.Next();
}
DDT.CloseDriver(driver.Name);
}
If test using excel 2007, it will encounter the error:
Excel cannot open the file 'test.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.