Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a scenario where I have an Excel report based on a group_id field in the Cycle, ans that Excel report needs to conditionally hide/show certain worksheets within it based on the value of group_id. I've been experimenting with a macro but am not getting the desired result, that is, all worksheets show up for all group_ids after I run my Publish task. I see this note online about how the macros "are not executed" and am wondering what this means..... does the user have to actually execute the macro? Is there anyway to get something like this to work? I do not think a paging solution will work because I mix and match QlikView charts on one Excel worksheet at times.
"Qlik NPrinting can generate Excel reports in .xlsm format. Visual basic macros can be created inside the Qlik NPrinting Designer and will be available in the final report. However, they are not executed."
hi Kris,
Its simple - yes - nprinting does not execute macro during report generation. That macro is designed to be executed on users side so yes-You need to design it so when users are opening your xlsm file then macro runs. It can run for example when “on open” trigger kicks in.
now discussing paging solution may be possible but we would need to understand scenarios in detail.
cheers
hi Kris,
Its simple - yes - nprinting does not execute macro during report generation. That macro is designed to be executed on users side so yes-You need to design it so when users are opening your xlsm file then macro runs. It can run for example when “on open” trigger kicks in.
now discussing paging solution may be possible but we would need to understand scenarios in detail.
cheers
Hi,
VBA macros are supported only in Excel templates. Supported means that you can import an .xlsm file with VBA code or develop VBA code during the template editing. Then, if in the publish task you select .xlsm as output format, that VBA code will be copied in all generated reports but never executed for security reasons.
You can follow @Lech_Miszkiewicz 's suggestion and trigger the macros execution on file opening or let the user to run them manually.
Best Regards,
Ruggero
You can consider some alternative solutions to Macros to display some objects according to the filters. An option that you can apply in Excel reports is the object filter:
A more effective option is the conditional output. This can be applied only to PixelPerfect reports:
Thanks everyone. I'll continue to experiment with macro code by adding in some Open logic. And the object filter idea only works partially...it won't show the object in the worksheet, but the worksheet still shows up and this will only confuse our clients.