Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview 10: Exporting table data to a file on the server (with unique name per user/machine)

Hey,

Before we upgraded from Qlikview 7.5 to Qlikview 10 we had the following functionality in our qlikviews:

The user would press an "Export" button that would start a macro script.
The script used the ServerSideExport command to create a file from a specified table.
The file name was set to be the users machine name.
The exported file contained the data from a specific table in an XML format.

That way each user that pressed the export button would have a unique file on the server with his data (The exported table reflected the users selections).

After we upgraded to Qlikview 10, the ServerSideExport command stopped working.
We tried using the ServerSideExportEx command which is mentioned in the Qlikview 10 reference, but it doesn't work.
We also tried using the Export action but it doesn't allow setting a dynamic file name.

It's imperative that we could export the user selections to a file on the server, and that each user will get a unique file name.

Any help would be greatly appreciated.

Thank you,

Katie D.

4 Replies
prieper
Master II
Master II

Have not tested, but in the API-guide you may find the below sniplet

set cs = ActiveDocument.GetSheetObject("CS03")
cs.ServerSideExportEx "C:\test.html" , ";" , 0 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF


There you have the Server Side Export. The destination - above "C:\test.html" - may be created using a variable.

HTH
Peter

Miguel_Angel_Baeyens

Hello Katie,

I may be missing something but you always can export a chart giving a path in a UNC format \\SERVER\Resource\Path, that should store the result in the server.

Is that correct?

Not applicable
Author

Thank you for your replies.

Miguel, Although it's suppose to export to a UNC folder, it fails on all type of folders including a simple file export.

I've found out something yesterday after I wrote my post:
I tried creating a new QV document with some sample data and export it using ServerSideExportEx. It worked perfectly.
Then I copied the macro code from the new document and pasted into my existing document that I want to export data from. I ran the script, but damn, it stopped working.
So the same export code works well on a new document, but on the existing document it fails.

The existing document was created originally in an older version of QV (I believe 8.2), but since then it was edited and saved in QV 10.
I can't recreate my existing document from scratch in QV 10 since it's a large document with multiple sheets, and would require great amount of work.

Any thoughts on possible solutions would be great.

Thank you,

Katie D.

Not applicable
Author

I managed to solve the problem.

I indeed used ServerExportEx, but I also saved the Qlikview to a new file using "Save As...".
That did it, and now it exports without any problems.

Thank you for the help.

Katie D.