Forum Discussion

haridi's avatar
haridi
Occasional Contributor
10 years ago

Testing web application that exports a csv file How can I read a specific cell from Excel csv file

I'm testing a web application that exports data to a csv file.  The file opens in excel I can navigate to a specific cell in the file but I have not been able to read the content of the cell. 

 

funceion test1()

{

var comboBox;

comboBox = Aliases.Excel.wndXLMAIN.EXCEL.comboBox;

comboBox.SetText("AM7");

edit.Keys("[Enter]");

 

// Here I'm in the location I need but I cannot read the content of AM7

 

}

  • Ravik's avatar
    Ravik
    Super Contributor
    Hi, SetText and Keys methods are not usefull for reading data. Both methods are used to set data into the object. for reading data from csv file TestComplete provide DDT.CurrentDriver.Value(index) method for reading data from the csv file.DDT.CurrentDriver.Value() method read column values at the index with 0 (zero) For more information please check below link it is may helpfull for you http://theitqc.blogspot.in/2014_06_01_archive.html