murugans1011
12 years agoRegular Contributor
DDT Help
While performing DDT using Excel 'DDT.CurrentDriver.Next' focus next row in excel.is there anyway tat we can set focus to the particular row?
function excel2array()
{
var excel = DDT.ExcelDriver("C:\\data.xls", "Sheet1");
var data = []; // array to store all rows
while(!excel.EOF())
{
var row = []; // array for storing data from a single row
for(var i = 0; i < excel.ColumnCount; i++)
{
row.push(excel.Value(i));
}
data.push(row);
excel.Next();
}
DDT.CloseDriver(excel.Name);
}
At the end, the data array will contain all data from the Excel sheet. To access a particular cell:
data[0][1] - contains value from row 0, column 1, etc.