stefanwalther / sense-export

Just a simple button to export data in your Qlik Sense applications.
Other
29 stars 27 forks source link

File Name (Optional) is not working #49

Open tankutk opened 6 years ago

tankutk commented 6 years ago

File Name (Optional) is not working

  1. Create variable for the folder of excel to export
  2. Add OsUser() with right function to get user registerednumber
  3. Combine them in File Name area with FX

When i press Export, i get save as dialog with a name like cc1ba5a4-ea8a-48b9-9dd6-4259017b4ffe.xlsx

What can i do to export the specific folder with a specific name?

Qliksense Server November 2017 (11.24.1)

Operating system

[x] Windows [ ] OSX [ ] Linux

Qlik Sense

[ ] Desktop [x] Enterprise

Browser

[ ] Chrome [ ] Firefox [x] Internet Explorer [ ] Edge [ ] Others: XXX

Versions

by the way don't have a chance to open project in devhub becouse of capture

Thanks for your help

Tankut Kocabas tankut.kocabas@gmail.com or tkocabas@assetbilisim.com

lilianvallon commented 5 years ago

Same here. Optionnal name doesn't work..... Tested on windows with IE and Firefox. And i just want to define a static value, like file.xlsx instead of having an ID.

rickpostprovelu commented 5 years ago

We have the same problem. In the code we can see that the 'File name (optional)' is currently only possible in the 'CSV Tab separated' and with the 'CSV - Client side' options.

We checked this and it seems that only exporting to 'CSV - Client side' is working properly. The Tab separated file is probably deprecated since the last commit.

I will let you know if we found a fix for naming the exported Excel files.

rickpostprovelu commented 5 years ago

So, here is the answer about the filename exporting not working.

In short: It only works in Qlik Sense Desktop.

Long story: For the options Open XML, Tab separated and Comma separated it uses the parameter qFileName. This option is only available in QS Desktop. To avoid this problem Stefan used a 3rd party code called FileSaver to export his function. In this function he collects all data and defined the styling for every row in a loop. This way you can make 'easily' a CSV-comma separated or tab separated. But an Excel file is too complicated to remake.

So the conclusion: In QS Enterprise only the client-side format works for naming to export.

See click documentation about the ExportData method used in this extension. https://help.qlik.com/en-US/sense-developer/April2019/apis/EngineAPI/services-GenericObject-ExportData.html