Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bnelson111
Creator
Creator

Macro to Select two Charts and Export to PNG.

Everyone,

I have a Macro that is working to export one chart to a png file. I wish to select and export two charts to make one png. Any help gratefully appreciated.

Macro that is working for one chart 78, i wish to see chart 78 and chart 77 on the one png?

Sub ExportToPng()

ActiveDocument.GetSheetByID("SH17").Activate

ActiveDocument.GetApplication.WaitForIdle

ActiveDocument.GetSheetObject("CH78").ExportBitmapToFile "c:\dashboard.png"

End Sub

Thanks in advance Brett

26 Replies
Anil_Babu_Samineni

PDF is lovable option. Have you seen marcus_sommer‌ reply over there to send PDF and merge into Image which you required the format.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bnelson111
Creator
Creator
Author

Seen it. The only issue is that its for a presentation maybe better in power point if i can?

marcus_sommer

Have you tried the there mentioned ImagePrinter?

- Marcus

Frank_Hartmann
Master II
Master II

have a look at this thread:

Export Sheet to File with ExportBitmapToFile

The last post contains a qvw to export from a container and saves to single png

hope this helps

bnelson111
Creator
Creator
Author

Change approach, looks like the png is not work as i have several charts and and logos, pdf is not option need to look at power point but need size and spacing also image in text box to go one slide

bnelson111
Creator
Creator
Author

Is there a virtual container? that sizes the charts as original? as fitting into container is a nightmare

marcus_sommer

Quite often it's helpful to use special adjusted containers and objects for export/printing-tasks which are reside on a hidden sheet.

- Marcus

bnelson111
Creator
Creator
Author

Sounds like the way, how?

marcus_sommer

Create a new sheet and set a visibility condition like: osuser() = 'YourNTNAME' and then create there new objects and/or copy them from your other sheets and then adjust the objects like you needs them and then you could use these objects within your macro.

- Marcus

bnelson111
Creator
Creator
Author

The container is not going to work unfortunately.