JIRA- Change export file extension

Tam Nguyen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2012

Hi,

I want to change the default file extension of issues views exported excel file from "xls" to "xlsx".
I think we can do that by modifying system-issueviews-plugin.xml in WEB-INF/classes,
i tried to modify excel part like bellow and restart JIRA but it didn't take effect,
JIRA still keep generating a file with "xls" extension

<search-request-view key="searchrequest-excel-all-fields" i18n-name-key="admin.issue.views.searchrequest.plugin.excel.all" name="Excel" class="com.atlassian.jira.issue.views.SearchRequestExcelViewAllFields" state='enabled' fileExtension="xlsx" contentType="application/vnd.ms-excel">
        <resource type="velocity" name="header" location="templates/plugins/searchrequestviews/searchrequest-excel-header.vm" />
        <resource type="velocity" name="footer" location="templates/plugins/searchrequestviews/searchrequest-excel-footer.vm" />
        <resource type="velocity" name="descriptionTable" location="templates/plugins/searchrequestviews/searchrequest-description-header.vm" />
        <order>10</order>
    </search-request-view>
    <search-request-view key="searchrequest-excel-current-fields" i18n-name-key="admin.issue.views.searchrequest.plugin.excel.current" name="Excel" class="com.atlassian.jira.issue.views.SearchRequestExcelViewCurrentFields" state='enabled' fileExtension="xlsx" contentType="application/vnd.ms-excel">
        <resource type="velocity" name="header" location="templates/plugins/searchrequestviews/searchrequest-excel-header.vm" />
        <resource type="velocity" name="footer" location="templates/plugins/searchrequestviews/searchrequest-excel-footer.vm" />
        <resource type="velocity" name="descriptionTable" location="templates/plugins/searchrequestviews/searchrequest-description-header.vm" />
        <order>10</order>
    </search-request-view>

Did i miss any thing or my thought is wrong?

Cheers,
Tam

6 answers

1 accepted

0 votes
Answer accepted
CEDRIC ZABEL
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2012

I don’t know how to do this, but I have to ask: why do you want to do this?

The exported Excel file isn’t actually a true Excel file. It’s actually an HTML file. However, Excel knows how to open HTML files with the .xls extension and convert them. But if you give an an .xlsx extension, Excel expects that file to actually be an Excel Microsoft Office Open XML Format Spreadsheet file, which it isn’t. Excel won’t open that. (At least my Excel doesn’t open it — perhaps the most recent version does.)

So I can’t think of any reason why you’d want to change the file extension. If you actually want Jira to create a true XLSX file, that’s a different story. It’s also considerably more difficult.

Tam Nguyen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2012

Thanks Cedric! You are absolutely right, the easiest way is generate an html file with "xls" extension, then open it in MS Office and save as XLSX file.

1 vote
Amy Balmain May 6, 2013

I have a related question. My company is trying to move away from using office to using googledocs with all documents stored using Drive.

I've tried using Documents to Go and Olive Office (I also don't have a laptop any more, only a nexus 10 tablet) can't open the file, I'm guessing because it isn't an actual xls file.

Anyone got a any ideas?

Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2015

The plugin that I mention in my answer (Better Excel Plugin available at https://marketplace.atlassian.com/plugins/com.midori.jira.plugin.betterexcel) will solve also this. As it exports an actual native Excel file, that can be imported to any spreadsheet tool that can read the XLSX format, including Google Spreadsheets, Open Office or Numbers.

1 vote
Alan Gardebrecht March 5, 2013

I have been experiencing the same or similar issue that Adam is having, except we are using Excel 2007 for the export of filters in JIRA v5.2.5. Below are the error messages...clicking Yes in the first one produces the second one. Any guidance or should I submit a ticket with JIRA?

Thanks!

Alan

0 votes
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2015

As other answers mention, simply changing the file extension will not solve the problem. Excel may have difficulties parsing HTML files, no matter what you name those.

As a real solution to the core problem, you can export your issues to real XLSX files with the Better Excel Plugin. That warning will never displayed again, but here is a ton of other valuable benefits (full comparison):

  • You can use real data formats (numbers, dates, etc.)
  • Display format is separated from the value (you can export time values in milliseconds and display in hours, e.g.)
  • You can use formulas, functions, charts, pivot tables, pivot charts and all other killer data analyis features of the most widely used spreadsheet tool

 

 

0 votes
Adam Karl January 31, 2013

There is a new problem with export to Excel when using Office 2013. Microsoft has dropped support for converting HTML when using the XLS format. The effect is that if you use Excel 2013, an exported XLS from JIRA now crashes Excel upon opening after giving a warning message like the following "the file format and extension don't match". I have worked around this by saving the file with the htm extension and then manually opening it in Excel. That workaround is pretty painful for Office 2013 users. I think this warrants an issue being logged for Office 2013 support.

0 votes
Tam Nguyen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2012
Any one has idea on this?

Suggest an answer

Log in or Sign up to answer