JIRA- Change export file extension

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

Accepted Answer
0 votes

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.

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.

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

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?

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.

Any one has idea on this?

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.

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

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

468 views 7 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you