Hi, There is no problem with your code, run it and it works fine, only need to check that path to the excelsheet is correct. also pls find the code enclosed.
Option Explicit
Dim vendMiles, vstartMiles, vGallons, vCost, vMile_Gallon
Dim myP
Dim vURL
Dim xlPath, xlSheet
Dim vRows, i
Dim vRow
xlPath = "C:\Project_Gas_Cal\Calnet02.xls"
xlSheet = "TestData"
'Add new DT
datatable.AddSheet "dTD"
'Import our XL into DT
datatable.ImportSheet xlPath, xlSheet, "dTD"
'Get the Row Count
vRow = datatable.GetSheet("dTD").GetRowCount()
print "Rows are " & vRows
For i = 1 to vRows
datatable.GetSheet("dTD").SetCurrentRow(i)
Print "Value for Rows" & i & "is" & datatable.Value("endMiles", "dTD")
Next
'Read the values from the DT
'Perform the activies
'Modify the results
'Export the DT
systemUtil.Run "iexplore.exe", vURL
Set myP = Browser("IE").Page("Pg1")
myP.WebEdit("endRead").Set vendMiles
myP.WebEdit("startRead").Set vstartMiles
myP.WebEdit("gallons").Set vGallons
myP.WebEdit("gasPrice").Set vCost
myP.Image("Calculate").Click
myP.Sync
vMile_Gallon = Browser("IE").Page("Pg1").WebElement("mGallon").GetROProperty("innertext")
print "Value is: "&vMile_Gallon
Browser("IE").Close
Function vVerify()
print "Verify if the output is correct"
End Function
Any problem let me known.
Good luck
George
On Monday, October 22, 2012 5:13:43 AM UTC+1, Demose wrote:
My Specs:
Vista Home Premiume