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

export chart macro issue

I created 20 buttons with the macro below to export charts. The charts to be exported names are Chart1, Chart2 etc..


Button 1 macro

set obj=ActiveDocument.GetSheetObject("CH12")

obj.ExportBitmapTofile "C:\eWindow\Monthly Stats\August Monthly Stats\TestChart1.jpeg"



The problem now is when I created a Button2 with simlar macro but chart name changed toTestChart2.jpeg, the chart name in macro in Button1 will be changed to TestChart2.jpeg as well.

I need each Button to have a different chart name to be exported. Any suggestions would be much appreciated!

Thanks,
JLee

1 Reply
marcus_sommer

I would use only a single button, which read the required charts (possible values from a extra field - created per inline-load) and run within a loop the export-routine. For code-snippets to read fields and using loops see APIGuide.qvw.

- Marcus