Macro that combines two sheet objects and export as a single image.
I have come across some questions posted by the community members asking if there is any way to combine 2 or more sheet objects and export them into a single image file.
While this is not possible directly as Qlikview objects can only be exported one at a time into an output file, there is a workaround available.
The workaround is to programatically create a container object, load the sheet objects into it in a grid style and export the container object as a picture file. While this idea is not entirely new, I thought I would come up with a working example.
Please see the attached qvw and let me know if it is of any use for you guys.. Hope that somebody will find it useful.
In the attached file, I have two sample chart objects and a button. The button has an action that calls a macro that does the following
Create a container object
Set its style to 2X1 grid
Add the two chart objects to the container
Call containers export method to export it as a picture into the target file
Here is the macro code.
set ContainerObj = ActiveDocument.Sheets("Main").CreateContainer