[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Extension xls instead of xlsx  XML
Forum Index -> Development
Author Message
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 [Disk] Download
 Description Filled attributes of t:filedownloadbutton
 Filesize 18 Kbytes
 Downloaded:  555 time(s)

 Filename xls_not_xlsx.PNG [Disk] Download
 Description File extension is not considered
 Filesize 6 Kbytes
 Downloaded:  561 time(s)

[WWW]
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
[WWW]
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
[WWW]
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
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
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
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team