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
#2
Not Solved
Do you want to move an excel worksheet from one excel(abc.xls) to another excel(xyz.xls)?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Code not recognising Browser object as existing brigna 0 1,863 12-04-2014, 08:32 PM
Last Post: brigna
  Qtp can not identify existing script prit deo 0 1,927 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 10,035 09-26-2012, 07:00 PM
Last Post: krr
  Copy Excel Worksheet to DataTable simon_schreiner 0 2,767 02-29-2012, 03:53 PM
Last Post: simon_schreiner
  Check an object existing on a Browser linhke 8 6,343 03-03-2011, 12:49 PM
Last Post: rajeshwar

Forum Jump:


Users browsing this thread: 1 Guest(s)