02-22-2011, 03:00 PM
Hi,
Below is the scenario:
I have to open an excel file from the application during run time. And I have to get the record count from that excel sheet.
It is taking more seconds to open the excel sheet when data is more.
Used below code but did not work:
Can anyone help me with solution?
Thanks,
Ravi.
Below is the scenario:
I have to open an excel file from the application during run time. And I have to get the record count from that excel sheet.
It is taking more seconds to open the excel sheet when data is more.
Used below code but did not work:
Code:
Public Function Export_Debug()
Browser("X").Dialog("File Download").WinButton("Open").Click
Do
Wait(2)
On Error Resume Next
Set objExcel = Getobject(,"Excel.Application")
Loop Until objExcel.Visible = True
rowCount = objExcel.ActiveWorkbook.ActiveSheet.usedrange.rows.count
Reporter.ReportEvent micDone, "Record Count in Excel", "Record Count is: " & rowCount
objExcel.Quit
End Function
Can anyone help me with solution?
Thanks,
Ravi.