Jump to content

Unwanted merged rows in excel export


rromannissen

Recommended Posts

Greetings,

I'm currently having problems with excel exports in Jasper Reports. The output excel files of some of my reports have unwanted merged cells that appear randomly, depending on the data that's being used to generate the report (for the same data, the merge appears always in the same place).

We detected this problem in Jasper Reports 3.0 and migrated to 4.6.0, facing the exact same issue in this version. All jrxml files were recompiled for the new version and the result was the same.

Attached you'll find an output file that reproduces the issue. To find the merged rows, go to the GAPS2 tab and take a look at rows 5 and 6.

Thanks very much in advance.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Yes this is a common difficulty in excel output formats. In my custom reporting platform that uses jasperreports I eventually added CSV as an export type and have users use CSV for any reports that pose a problem in the cell merging.

 

That said, there are a few ways to mitigate the issue. We also support different templates for each export format in our application, so if the user wants to generate the report in CSV/XLS/PDF/HTML each of these formats has it's own internal reference to a different template entirely.

 

In the XLS templates we hide report titles, make sure there isn't even a pixel of space between columns, and no elements which overlap in the headers and footers, if everything lines up perfectly in your template then the XLS output is nice and clean.

 

Otherwise ... as I said ... CSV just works better.

Link to comment
Share on other sites

  • 3 years later...

In my case, I was getting a merged row between rows 5 and 6 in my report.  I determined that my actual subreport was 41 pixels high and the corresponding subreport placeholder thing in the main report was 20 pixels high.  Well, 20 pixels was about where rows 5 and 6 were, so that's where the hiccup was.  Making the subreport thing on the main report also be 41 pixels high fixed the problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...