Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cmccafferty
Contributor III
Contributor III

Macro to Export to CSV - Tabs containing different triggers

Hi All,

I am sort of 20% way through my overall problem and have come stuck.

Basically what I need to do is have Qlikview autosave some CSV files for me when the QVW refreshes overnight.

My code is this:

sub Export_Trust

set trust1 = ActiveDocument.GetSheetObject("CH205")
set trust2 = ActiveDocument.GetSheetObject("CH210")
set trust3 = ActiveDocument.GetSheetObject("CH207")

trust1.ExportBiff "X:\Business Performance\Finance\Cash\Download\QVATC.csv"
trust2.ExportBiff "X:\Business Performance\Finance\Cash\Download\QVTrust1.csv"
trust3.ExportBiff "X:\Business Performance\Finance\Cash\Download\QVTrust2.csv"

end sub

The problem:

It's working in that it is saving down the right tables, however,  "trust1" is on a different tab to "trust2" and "trust3", and therefore should have different triggers applied. And the downloads seem to only have the triggers from one of the tabs applied.

 

"trust1" needs to return data based on a certain date range, and "trust2" and "trust3" need to return different data on a different date range.

The QV tab/sheet containing "trust1" is called "ATC CM" and the tab/sheet containing the other two is called "Trust CM".

Can anyone help please?

Thanks

 

Labels (7)
13 Replies
Frank_Hartmann
Master II
Master II

NO,
the execution of macro is triggererd by the let statement in script!
cmccafferty
Contributor III
Contributor III
Author

No luck 😞
Frank_Hartmann
Master II
Master II

just found this (link😞

apparently you can't get a QMC to execute a macro, you need to run it from a .bat file, executed from Windows scheduler, see the following thread: http://community.qlik.com/thread/115808

 

hope this helps

cmccafferty
Contributor III
Contributor III
Author

Yikes, this seems way beyond my knowledge.

Is that difficult to do? I dont even know where to begin :S