Ilakkk
3 years agoContributor
Read excel data/links in javascript test complete
Hi team, I have tried to read the data file using javascript in test complete.But shows error as "Type error: cannot read the property 'SheetByTitle' of null"
function ExcelRead()
{
    var excelFile = Excel.Open("C:\\temp\\DataStorageExcel.xlsx");
  var excelSheet = excelFile.SheetByTitle("Sheet1");
  var valueA = excelSheet.Cell("A", 3).Value;
  var valueB = excelSheet.Cell(2, 3).Value;
  var valueC = excelSheet.CellByName("C3").Value;
}
Can any one help regarding this issue or I want to fetch the weblinks from excel file one by one that links need to execute.
Thanks in advance.
- There's no problem with the code, as it works (using TC v15.45.31.7) - I suggest you check your spreadsheet