How to export JIRA report to multiple worksheets of excel?

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();
        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">
	<tr class ="rowNormal">

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!


1 answer

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:


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

255 views 0 6
Read article

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