Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Access MS Excel Controls using QTP
#1
Not Solved
Hi ,

Is there a way to access the MS Excel controls through QTP.
I want to refresh the Data in the Excel sheet and I tried to use the below code but in vain.

Code:
set xlo = createobject("Excel.Application")
Set xlbook = xlo.Workbooks.Open("XXXX")
xlo.Visible = true
Set xlsheet = xlbook.Worksheets(1)

xlo.CommandBars("Worksheet Menu Bar").Controls(7).controls(14).execute
Controls(7) - > Data tab in Ribbon
Controls(14)-> Refresh option

But this code throws "General run Error"

Please share your knowledge.
Reply


Messages In This Thread
How to Access MS Excel Controls using QTP - by gayuamlu - 06-13-2015, 02:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to identify controls embedded within WinListView cells Devesh Thakur 5 2,325 04-19-2018, 10:56 AM
Last Post: Devesh Thakur
  How to access the excel userform using QTP nigamreetesh84 0 2,505 02-11-2013, 08:58 PM
Last Post: nigamreetesh84
  How to do scripting if application contains 3rd party controls nistalaramesh 3 7,303 11-16-2011, 10:37 AM
Last Post: jayanths
  Controls in MS Access Application using QTP indianinworld 0 2,398 08-03-2011, 02:47 PM
Last Post: indianinworld
  QTP internal controls vanibandla 1 2,728 03-15-2011, 09:45 AM
Last Post: manishbhalshankar

Forum Jump:


Users browsing this thread: 1 Guest(s)