exce reding with DDT
Hi,
I wrote a script in DDT to read rows and columns from excel sheet but it is displaying only two even after my sheet having more than 2 rows.:-
var RecNo;
// Posts data to the log (helper routine)
function ProcessData()
{
var i;
for(i = 0; i < DDT.CurrentDriver.ColumnCount; i++)
Log.Message(DDT.CurrentDriver.ColumnName(i) + ": " + aqConvert.VarToStr(DDT.CurrentDriver.Value(i)));
Log.PopLogFolder();
RecNo = RecNo + 1;
}
// Creates the driver (main routine)
function TestDriver()
{
var Driver;
Driver = DDT.ExcelDriver("C:\\Users\\naveenks\\Documents\\ExcelRead.xlsx", "Test");
// Iterates through records
RecNo = 0;
while (! Driver.EOF() )
{
ProcessData(); // Processes data
Driver.Next(); // Goes to the next record
}
// Closes the driver
DDT.CloseDriver(Driver.Name);
}
Regards,
Naveen
Thanks for the reply, Naveenks. As tristaanogre mentioned, it's worth adding your excel file here (or at least a sample to demonstrate the data structure) with the image of the log you get.