Hi,
I want to extract the data from an existing Visual from an existing Qlik App & store the result on Disk with a specific name.
I manage to do 1-3, but dont manage to change the filename of the downloaded file. Any advice?
//open app
var app = qlik.openApp('a5a8c513-d2e5-4ec9-be1e-1ebd995a493a', config);
// Get visuals data & export
app.visualization.get('EaqBxc').then(function(vis){
vis.exportData({format:'CSV_T', state: 'A'}).then(function (link) {window.open(link);
window.close();
});
});
} );
Thanks in advance
I will answer this one myself 🙂 you can rename the file in Client Javascript, however, its not possible to change the path. The file will always end up in your profiles Download folder set in your browser, which makes perfect sense.
If you want to specify filepath/name I assume Node.js is the way to go.
Hi @pauljohansson , your goal is to change the file name that it comes automatically from Qlik server, such as a50e4226-79e3-45cb-aed4-744dbd52c4b0.xlsx for an excel file?
If so, you can rename the exported file before giving it to the client. You can do it with few Javascript lines
Hej @alex_colombo ,
no , the goal is actually to change the download path, which is not possibly using client javascript - the file will always end up in the download folder. I guess the solution would be to go for Node.js,
br
Paul
Why do you want to change the download folder? This is a client setting which comes from browser settings. Or you mean the download url such as https://_qlikServer_/tempcontent/c4375340-0f60-4f8d-b42c-edb10f98db73/898f86e9-5700-4dee-a547-56ca04529cc2.xlsx?serverNodeId=f547ea7c-864a-44a3-87a2-00817848d756?