Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am a newbie to QV and Macro world. Please bear with me if this is a silly question. I have created a qlikview document with two sheets sheet1 and sheet2 and each sheet has bunch of charts. I have a created a macro to export the charts from sheet 1 and it works fine. The issue I am facing is when I try to create a macro for the second sheet, the code I put in is overwriting the code on macro 1 on sheet 1. so is there a way to isolate the two macros? is there a better way of doing this? Please help
There's only one module per document to put macro code in. You need to give the different macro's their own name and use those names to call the macros.
Sub ExportSheet1
...do sheet1 export stuff here...
end Sub
Sub ExportSheet2
...do sheet2 export stuff here...
end Sub
Hi, Attached the qvw file. Look and let me know is that you want. Regards. Siva
Siva,
I am on personal edition so cannot open the Qvws created by others. Can you please put your code here in this thread? Appreciate your help.
Issue is I am unable to export charts on sheet2 when I put everything in the same module. May be I am missing something.
Hi Arjun,
You can find relevant code at:
http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/
This should really help you.
-Anand.
sub exportToFolder ChartPath = "D:\QV Export" ActiveDocument.GetSheetObject( "CH01").ExportBitmapToFile ChartPath & "B.jpg" ActiveDocument.GetSheetObject( "CH02").ExportBitmapToFile ChartPath & "D.jpg" end sub