Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to embed worksheet to already existing excel
#1
Not Solved
Hi guys,

I am trying to embed worksheet to already existing excel using vb script in QTP.

I am using the same script that adds pictures, but this doesnot seem to work.

Code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True

Set objWB = objExcel.WorkBooks.Open("C:\test.xlsx")
Set objWS = objWB.Worksheets(3)

objExcel.ActiveCell.Worksheet.Pictures.Insert("C:\img\abc.jpg")

objWB.Save

objExcel.Quit

Can anybody help me out here. Thanks in advance. Smile

Regards,
Mahak
Reply


Messages In This Thread
Need to embed worksheet to already existing excel - by mahaktikoo - 09-14-2012, 04:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Code not recognising Browser object as existing brigna 0 1,724 12-04-2014, 08:32 PM
Last Post: brigna
  Qtp can not identify existing script prit deo 0 1,803 03-03-2014, 04:23 PM
Last Post: prit deo
  How to identify the object reference to the existing(already opened) Excel sheet yogeesh 1 9,776 09-26-2012, 07:00 PM
Last Post: krr
  Copy Excel Worksheet to DataTable simon_schreiner 0 2,625 02-29-2012, 03:53 PM
Last Post: simon_schreiner
  Check an object existing on a Browser linhke 8 5,813 03-03-2011, 12:49 PM
Last Post: rajeshwar

Forum Jump:


Users browsing this thread: 1 Guest(s)