Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Generate excel file from the load script

Hi everybody,

I'm Maurizio, I'm a new user of Qlikview and this is my first open thread!

I have this macro
Sub ExportExcel

     Set tableToExport = ActiveDocument.GetSheetObject("CH04")

     tableToExport.Export "C:\output.csv",";"
End Sub

I can call this sub pressing a button but how can I run it from the load script?


Maurizio

1 Solution

Accepted Solutions
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

I think it is not possible from the script (this is a sub using visualisation objects)

You could use the onPostReload trigger (settings-document-triggers) and add the same action you set in the button.

View solution in original post

5 Replies
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

I think it is not possible from the script (this is a sub using visualisation objects)

You could use the onPostReload trigger (settings-document-triggers) and add the same action you set in the button.

Not applicable
Author

Thanks a lot!

That's just what I need!

Not applicable
Author

I got another issue related to the task.

If I run the load script manually It works, but If I run the load script by using Qlikview Server no files are created. How could I resolve?

Maurizio

bbi_mba_76
Partner - Specialist
Partner - Specialist

Well, the reload with the distribution service does not load the visualisation object, so your chart is not created during the reload.

You have to use the qv.exe to run the reload (by batch) or you could create a similar table in your script and the store it.

http://qlikviewmaven.blogspot.com/2008/08/qlikview-command-line-and-automation.html

Not applicable
Author

Got It! Thanks again!

Maurizio