We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
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
There's no problem with the code, as it works (using TC v15.45.31.7)
I suggest you check your spreadsheet
Hey, Thanks a lot. I did small mistake while giving the path.
Hey one more help for me. For the same code how can I get the row/cell values one by one.
For example, in row I have stored some links first I want to hit the first link the script completed I want to hit next link and so on.
Use https://www.w3schools.com/js/js_loop_for.asp to iterate through the cells.