Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Export and Import

Hi Everyone,

I'm trying to set up a macro button which will export the contents of a table with a lot of calculations out to a qvd, then pull that qvd back into QV to do some additional manipulations.

First, is this possible? Second, any adive or clues on what commands to use? I've read about how to create qvd's in the script, not sure how to do it in a macro.

Thank you,

Dave

1 Solution

Accepted Solutions
disqr_rm
Partner - Specialist III
Partner - Specialist III

Yes, very well possible.

You can export content of a chart (table) using macro:


set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "C:\test.qvd", 4


After export you can trigger


ActiveDocument.PartialReload


to reload the document. Then in the QlikView script you can user REPLACE LOAD.... from this QVD file. REPLACE keyword will allow only this load to execute with partial reload. Before you do the load statement you can set ErrorMode varible to 0 and after load to 1 to ignore the error if no QVD exists.

Hope this gets you going.

View solution in original post

5 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Yes, very well possible.

You can export content of a chart (table) using macro:


set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "C:\test.qvd", 4


After export you can trigger


ActiveDocument.PartialReload


to reload the document. Then in the QlikView script you can user REPLACE LOAD.... from this QVD file. REPLACE keyword will allow only this load to execute with partial reload. Before you do the load statement you can set ErrorMode varible to 0 and after load to 1 to ignore the error if no QVD exists.

Hope this gets you going.

Not applicable
Author

Thanks so much Rakesh! I used your tips and got my applications to work out exactly as I was intending.

Thanks again, Dave

stantrolav
Partner - Creator II
Partner - Creator II

Can i use any varible in name of exported file? SMTH like this:

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportEx "$(varExportDir)\test_$(varReferenceDate).qvd", 4

?

Not applicable
Author

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportEx "C:\test.qvd", 4

What is use of 4?

dmohanty
Partner - Specialist
Partner - Specialist

Will this work in AJAX mode?

I can't get it work from Access Point in AJAX mode. Any alternatives to this please?