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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

exporting objects from sheet to excel with the button by using macro

hi

i have created a report and now i want to create a button 'export to excel' and this button must export the objects of the active sheet to the excel...how cani achieve that ???

explain it with a simple example???

Labels (1)
1 Reply
Not applicable
Author

Define your macro as:

sub exportAll

          set s = ActiveDocument.ActiveSheet

          for i=0 to s.NoOfSheetObjects - 1

                         s.SheetObjects(i).SendToExcel

          next

end sub

Then make a button an make it run external->macro name exportAll

This will export everything on the active sheet to excel.

Hope this helps,

Brandon