Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Export to Excel report is saving with (.xls) extension, How can we change it to .XLSX ?

PraveenM90Nov 28 2017 — edited Nov 29 2017

Hi Experts,

My Jdev Versions are 11g R2(Studio Edition Version 11.1.1.7.0) and 12c(Studio Edition Version 12.2.1.0.0).

When i Import any Table data into Excel it was getting imported with the extension (.XLS) due to this when i open imported excel file it was showing a prompt message like below screen shot. When i choose Yes it was opening and having data(No issues except Prompting popup).

pastedImage_1.png

Any ideas? To get rid of above prompt ? or how to import file with (.XLSX)

When i change the extension of file to Test.xlsx it was not opening showing error like below.

pastedImage_14.png

I am using below code types to import Excel Files.

Type 1:

<af:commandToolbarButton text="Export to Excel" id="ctb5"

                                   icon="/images/excel\_icon.jpg">

  \<af:fileDownloadActionListener filename="Test.xls"

                                 contentType="text/html;chatset=UTF-8"

                                 method="#{TestBean.exportToExcel1}"/>

</af:commandToolbarButton>

Type 2:

<af:commandButton text="Export To Excel" immediate="true">

<af:exportCollectionActionListener type="excelHTML" exportedId="table"

                                 filename="Test.xls" title="ADF Faces Export"/>

Thanks

Praveen M90 :-)

This post has been answered by Timo Hahn on Nov 28 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2017
Added on Nov 28 2017
2 comments
674 views