Author |
Message |
14/03/2019 08:39:38
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi Björn
I use t:filedownloadbutton in order to download an XLSX file by means of exportURLXLSXWholeGrid (see attachment).
Although the filename attribute has a value with extension xlsx, a file name with extension xls is downloaded. This is tedious because of warning message (see attachment).
How can we force extension xlsx?
Kind regards, Daniel
Filename |
filedownloadbutton.PNG |
Download
|
Description |
Filled attributes of t:filedownloadbutton |
Filesize |
18 Kbytes
|
Downloaded: |
594 time(s) |
Filename |
xls_not_xlsx.PNG |
Download
|
Description |
File extension is not considered |
Filesize |
6 Kbytes
|
Downloaded: |
593 time(s) |
|
|
|
19/03/2019 14:50:16
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi Björn
I believe that the problem is not solved in version 20190318 of CaptainCasa.
If the problem can be solved with next regular version of CaptainCasa, I shall wait for it.
Kind regards, Daniel
|
|
|
28/03/2019 08:05:49
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi Björn
Can you estimate when this issue can be solved?
Kind regards, Daniel
|
|
|
09/08/2019 09:23:28
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi Björn
Now I have encircled the problem.
The cause must be that the class ExporterXLSXWholeGrid returns the content type "application/vnd.ms-excel" instead of "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet". The latter is the right one for xlsx files, see https://stackoverflow.com/questions/2937465/what-is-correct-content-type-for-excel-files.
Because of the wrong content type, IE and Chrome (but not Firefox) change the extension xlsx to xls.
Could you please fix this? I see no possibility to override the content type myself when using exportURLXLSXWholeGrid.
Regards, Daniel
|
|
|
13/08/2019 20:12:10
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5535
Offline
|
Hi Daniel,
thanks for your work on this. We included the new content type in the FIXGRID export.
There are four new methods as well for initializing the content type to some own valus (if desired):
Code:
public static void init_CONTENTTYPE_EXPORT_CSV(String value) { CONTENTTYPE_EXPORT_CSV = value; }
public static void init_CONTENTTYPE_EXPORT_XML(String value) { CONTENTTYPE_EXPORT_XML = value; }
public static void init_CONTENTTYPE_EXPORT_PDF(String value) { CONTENTTYPE_EXPORT_PDF = value; }
public static void init_CONTENTTYPE_EXPORT_XLSX(String value) { CONTENTTYPE_EXPORT_XLSX = value; }
We will pass some interim build to you on this tomorrow (Wed).
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|