Loop through a dimension and export a chart into power point

    I cam across a request for help from a user to have a macro that does the following

     

    • Loops through the values of a dimension
    • For each dimension value, copies a chart object
    • Pastes the copied objects into power point with 2 objects per slide(Single column and two rows)

     

    I thought this is a good request to put it as a blog post as someone else might find this useful or even use some parts of the macro code.

     

    Option1(Simple)

    Here is the overview of the macro code

    • Loop through the dimension
    • Select one value at a time
    • For each value selected, copy the chart object and paste into a power point slide
    • for each 2 iterations, create a new power point slide.

     

    Option 2(Complex)

    The reason for this complex macro is to try and use a container object to achieve a grid layout in Qlikview and then copy the container object into power point(I have not finished the container part in this post, may be in the future..)

     

    Here is the overview of the macro code

     

    • Loop through the dimension
    • Select one value at a time
    • For each value selected, clone the chart object
    • Detach the clone object and store the object ID in an array
    • Loop through the array
    • for each 2 iterations, create a new power point slide
    • Finally, loop through the array and close all the objects(remove them from the sheet)

     

    Hope it is useful to some one..Let me know your comments/suggestions please.

     

    You may check out my other blog post

    Macro that combines two sheet objects and export as a single image.