Forum Discussion
HKosova
Alumni
14 years agoHi,
When using Excel's Sheet.Cells API, you can't refer to the columns by headers. You can only use column indexes (1, 2 etc) or column letters (A, B etc).
However, if you read the file using TestComplete's DDT.ExcelDriver instead, you'll be able to use the column headers:
When using Excel's Sheet.Cells API, you can't refer to the columns by headers. You can only use column indexes (1, 2 etc) or column letters (A, B etc).
However, if you read the file using TestComplete's DDT.ExcelDriver instead, you'll be able to use the column headers:
Call DDT.ExcelDriver("C:\OutputOrders.xlsx", "Sheet1", True)
While Not DDT.CurrentDriver.EOF
fID = DDT.CurrentDriver.Value("ID")
' Do something with fID
...
DDT.CurrentDriver.Next
WEnd