Reading from excel was working before updating to Testcomplete 15.40.421
Hi,
The code below was working before upgrading to TestComplete 15.40.421.
function test()
{
var ExcelFileName = "C:\\ELink\\Queries\\Dataset_Comparison_Query_Result1.xlsx";
VerifyQueryResults(ExcelFileName);
}
function VerifyQueryResults(ExcelFileName)
{
// Get the sheet of the Excel file
var excelFile = Excel.Open(ExcelFileName);
var excelSheet = excelFile.SheetByTitle("Sheet1");
// Read data from the Excel file
var Difference = excelSheet.Cell(1, 2).Value;
if(Difference == 0)
Log["Event"]("Expected and Actual Datasets are the same");
else
Log["Error"]("Expected and Actual Datasets are not the same");
}
Now the "Difference" is always coming up as "undefined", when I am trying to read from the excel.
Below is the screenshot of the excel:
The "Difference" should be 0. Please help.
Thanks,
Hina