Is there any particular reason why using
DDT.ExcelDriver won't work for you? This object provides an interface to your Excel sheet that you can then input directly to your application.
You're code could be reduced to the following:
function TestExcelData()
{
var MyDDTObject = DDT.ExcelDriver("E:\\Anil-Backup\\Test Complete\\Projects_Old\\In4Suite Project\\ExcelFile\\Rental Database\\RentalTermSheet.xlsx", "Sheet1", true)
while (!MyDDTObject.EOF())
{
Log.Message(MyDDTObject.Value(0))
Log.Message(MyDDTObject.Value(1))
Log.Message(MyDDTObject.Value(2))
MyDDTObject.MoveNext;
}
DDT.CloseDriver(MyDDTObject.Name)
}