I am using JIRA report plugin to create a custom report where I want to export the report to excel file with multiple worksheets. I am able to export with single worksheet but can't export to multiple worksheets.
Here's my code for exporting to excel file:
public String generateReportExcel(ProjectActionSupport action, Map params) throws Exception { this.validate(action, params); final StringBuilder contentDispositionValue = new StringBuilder(); contentDispositionValue.append("attachment;filename=\""); contentDispositionValue.append(this.excelFileName).append(".xls\";"); ActionContext.getResponse().addHeader("content-disposition", contentDispositionValue.toString()); return descriptor.getHtml("excel", getVelocityParams(action, params)); }
And my .vm fle for the report looks like this:
<table id="myTable" border="1" cellpadding="3" cellspacing="1" width="100%"> <tr class ="rowNormal"> <td>Project</td> <td>$project<</td> </tr> <tr class ="rowNormal"> <td>Version</td> <td>$version</td> </tr> </table
I want to create a excel report with two worksheets where the $project variable is in one worksheet and the $version is in another. Does anyone have any idea?
Thanks in advance!
-Shantonu
Use the Better Excel Plugin and you can create Excel templates that contain any number of worksheets, and fill those with data. See this example with three worksheets, pivot table, pivot chart and real tabular data:
jira-excel-worksheets.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.