Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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...

Tags (1)
5 Replies
vgutkovsky
Honored Contributor II

Onpostreload and export to html

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

Onpostreload and export to html

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

Re: Onpostreload and export to html

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

jerrysvensson
Valued Contributor II

Re: Onpostreload and export to html

Hi XXX

Have you tried the macro ServerSideExport? Or ServerSideExportEx.

jerrysvensson
Valued Contributor II

Re: Onpostreload and export to html

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.

Community Browser