Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple objects Send to excel into one sheet

Hi,

I need to export all objects of a document into excel.

I have written the code as follows:

sub exp

Set objExcelApp = CreateObject("Excel.Application")

objExcelApp.Visible = true

Set objExcelDoc = objExcelApp.Workbooks.Add

set s = ActiveDocument.ActiveSheet

objs = s.GetSheetObjects

msgbox ubound(objs)

for i=lbound(objs) to ubound(objs)

msgbox objs(i).GetObjectID()

set xlSheet = objExcelDoc.Worksheets(1)

objs(i).SendToExcel

next

end sub

When i execute the above code, for each objs(i).sendToExcel, it opens a new xls file. But i need to send all the objects in the document into one excel sheet.

Please suggest how to proceed...

Thanks!!

0 Replies