Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to handle opening an excel during run time?
#1
Solved: 10 Years, 9 Months, 1 Week ago
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:

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.
Reply


Messages In This Thread
How to handle opening an excel during run time? - by Ravi_Chandra - 02-22-2011, 03:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can UFT Handle Detecting Redirects? zunebuggy 0 784 05-28-2020, 06:50 PM
Last Post: zunebuggy
  QTP not recogonising object during run time Lavanya N 2 3,542 10-28-2015, 12:46 PM
Last Post: vinod123
  Writing to Run time data table Neetha 5 11,672 08-27-2015, 10:18 AM
Last Post: supputuri
  Error while opening test run results vkalyankar 3 4,003 11-12-2014, 09:49 AM
Last Post: vinod123
  QTP Stuck at Opening stage TurtleRock 4 3,440 05-27-2014, 08:42 PM
Last Post: mauler69

Forum Jump:


Users browsing this thread: 1 Guest(s)