Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

excel reports inserted into <html><body>

Francesco R
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 6, 2018

Hi all.
I had a jira report well working in JIRA 4.1.1
I'm porting my plugin to the latest jira version and I checked the report implementation.
The body of the report is now inserted into <html><body> ... </body></html> tags and so neither LibreOffice nor MSOffice are able to open the file.
If I open it with a text editor and I remove the tags, all is ok and the report is exactly the same I had in former JIRA 4.1.1 version.
The function generateReportExcel() return the correct content of the report starting with

<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"

but the ultimate file contains on the top of it the following lines:

<html><head><title>My Report</title><meta name="decorator" content="none" /><meta http-equiv="Content-Type" Content="application/vnd.ms-excel; charset=UTF-8" /></head><body>

How to get rid of this html part ?

Thank you

1 answer

0 votes
Francesco R
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 9, 2018

I've seen that the view returned is always  ":report-result/JIRA.Templates.Core.Reports.Result.excel" in dispatchView method of JiraWebworkViewDispatcher class.
There is a way to change it ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events