Hi Robert...
I converted jscript code to VB and tried, it is working but what exactly happening is, it is displaying all the rows and columns data... below is the code...
My requirement is, if I say RowCount = 2 then it should display only 2nd Row data from excel, but the code which you gave is displaying 1st and 2nd row and column data. Any modifications I still need to do in the below code?
Sub ArrayTesting
ArrayTesting
RowCount = 0
Set MyDDTObject = DDT.ExcelDriver("E:\Anil-Backup\Test Complete\Projects_Old\In4Suite Project\ExcelFile\Rental Database\RentalTermSheet.xlsx", "Sheet1", true)
While Not MyDDTObject.EOF()
If RowCount = 2 Then
Log.Message RowCount
Log.Message(MyDDTObject.Value(0))
Log.Message(MyDDTObject.Value(1))
Log.Message(MyDDTObject.Value(2))
Else
Log.Message(MyDDTObject.Value(0))
Log.Message(MyDDTObject.Value(1))
'Log.Warning "data not found"
MyDDTObject.Next
RowCount = RowCount + 1
End If
WEnd
DDT.CloseDriver(MyDDTObject.Name)
End Sub