Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
J_Uri
Partner - Contributor III
Partner - Contributor III

Mashup Store table in excel/CSV (server side)

Hi.

I'm having issues downloading a table into the server on a mashup.

The idea is to store a table that contains a few dimensions and 2 variable inputs which once they hit the "export" button that data should get stored in an excel file in the server.

//EXPORT
require( ["js/qlik", 'jquery'], function ( qlik, $ ) {
    var app9 = qlik.openApp('App.qvf', config);
    var $exportButton = $( document.createElement('button')).text('Export').appendTo('body');
    var object = app.getObject('QV14','ObjectID');
    object.then(function(model) {
        var table = new qlik.table(model);
            $exportButton.bind('click', function() {
            table.exportData({download: true});
        })
    })
});

 

This allows to export the data into the client side. However, i need to store it into the server.

Any idea how should i approach this?

 

Best regards.

Labels (3)
1 Solution

Accepted Solutions
J_Uri
Partner - Contributor III
Partner - Contributor III
Author

Update:

The solution to create a web application to store the data we needed delayed the deployment of the project too much and was ultimately discarded.

We would have needed to create a nodejs server and create a service that would listen to petitions 24/7 and recover these fields and store them in a SQL databse or a CSV.

This topic was very helpful: https://community.qlik.com/t5/New-to-Qlik-Sense/Is-anyone-familiar-with-mashups-InputBox-to-store-in... 

Finally we opted to use Qlik OnDemand App to store the information we needed on the server in a QVD. This basically creates an app that is filtered by the user and stores the filtered information into a QVD. Quite simple and the only problem is that the apps are stored in the server aswell, which they can be deleted daily thorugh an automated task.

Hope this is usefull to somebody else.

 

Best regards, Javier.

View solution in original post

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Because of the sandbox security restrictions in the browser, you will need to  POST the data to a service running on the server (or some server) and have the service write the file. 

-Rob

J_Uri
Partner - Contributor III
Partner - Contributor III
Author

Thanks Rob for the reply. 

I've been looking into this and found a post that is saying that the file is located in the server when doing an export.

https://community.qlik.com/t5/Qlik-Sense-Integration-Extensions-APIs/How-to-include-quot-Export-data...

Could this mean that the export function would allow to export to the server? 

Could you provide an example of a service running on the server to capture that data? 

Best regards.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe the table.exportData() function you've show in your example will always run client-side, and therefore write to the local machine.  As far as example of writing server-side, what web server and framework are you using for your mashup?

J_Uri
Partner - Contributor III
Partner - Contributor III
Author

We're using the Qlik devhub so i'm guessing we're ussing the QlikServer as a web server. Otherwise i don't know what you're referring to.

 

Best regards.

J_Uri
Partner - Contributor III
Partner - Contributor III
Author

Update:

The solution to create a web application to store the data we needed delayed the deployment of the project too much and was ultimately discarded.

We would have needed to create a nodejs server and create a service that would listen to petitions 24/7 and recover these fields and store them in a SQL databse or a CSV.

This topic was very helpful: https://community.qlik.com/t5/New-to-Qlik-Sense/Is-anyone-familiar-with-mashups-InputBox-to-store-in... 

Finally we opted to use Qlik OnDemand App to store the information we needed on the server in a QVD. This basically creates an app that is filtered by the user and stores the filtered information into a QVD. Quite simple and the only problem is that the apps are stored in the server aswell, which they can be deleted daily thorugh an automated task.

Hope this is usefull to somebody else.

 

Best regards, Javier.