Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Onpostreload and export to html

Hi everyone,

I want to make a trigger every night at 00:00 automatically reload the whole document and export to html format.

But it isn't working. How can I do? What must I do on qlikview management console?

sub ExportAsHTML

ActiveDocument.GetSheetObject( "CH01" ).ExportHtml "C:\Users\aidata\test.htm"

end sub



Thanks...

5 Replies
vgutkovsky
Master II
Master II

Your issue is that you are trying to run a macro on QVS. Macros can only be run on clients, not on the server. So if you need this macro to be called, you need to do the following:

  1. Make sure that your htm file exists and the Publisher account has write access to it
  2. Changing your sub to run OnPostReload() should make sure that the HTML export occurs every reload
  3. Create a Publisher task to reload the QVW on a schedule & base any relevant dependencies off this task

That should do the trick.

Not applicable
Author

Hi ,

I am getting the error as "Error in writing " when i am trying to export the chart as the HTML page through macro. How ever if i am trying to export the table or the list box as the html Page it is working fine. Is the functionality ExportHTML is applicable only to the Table and list box. And not applicable to the Charts. Please correct me if i am wrong.

Not applicable
Author

Is there any way to execute that macro withought owning QV publisher???
My company only has the qlikview server installed.

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Hi XXX

Have you tried the macro ServerSideExport? Or ServerSideExportEx.

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Kavrosda:

If you install a developer on the server you can use Windows Task scheduler to run qv.exe as a batch job.

syntax : qv.exe /r <appname.qvw>

This will trigger the macro.