I would add a counter into the loop to keep track of how many times through the loop you are. So, the code would look like this. I'm sorry it's in JScript, I'm not really good at the syntax of VB so I default to what I know.
function TestExcelData()
{
var RowCount = 1;
var MyDDTObject = DDT.ExcelDriver("E:\\Anil-Backup\\Test Complete\\Projects_Old\\In4Suite Project\\ExcelFile\\Rental Database\\RentalTermSheet.xlsx", "Sheet1", true)
while (!MyDDTObject.EOF())
{
if (RowCount == 1)
{
DoRowStuff;
}
else
{
DoOtherStuff;
}
Log.Message(MyDDTObject.Value(0))
Log.Message(MyDDTObject.Value(1))
Log.Message(MyDDTObject.Value(2))
MyDDTObject.MoveNext;
RowCount++;
}
DDT.CloseDriver(MyDDTObject.Name)
}
As was pointed out, there's no need to distinguish the header row when using the DDT driver, it should automatically recognize the first row as header values.