Jump to content

XLSX metadata exporter


amongalen

Recommended Posts

Hello,

In my project there is a need to export reports to excel. While standard XLSExporter is really nice, we would like to have plain tables without headers/footers. From what I can tell there is a JRXlsMetadataExporter which would fit perfectly for that.

However, based on my tests, it exports to the old Excel format XLS, not the XLSX. The main problem is that it has a row number limit of  65536 which is quite low,  while XLSX has a limit of 2^20 (just over 1 million)

Sadly I wasn't able to find an equivalent exporter for XLSX. Does this exporter support exporting to XLSX as well? Do I have to set some flag for it to happen?

Btw. I'm not sure if it would actually be needed but is there an option to export to multiple files if report doesn't fit into a single XLS/XLSX file?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

It is a nice option. However, I don't think it provides all the functionality I need. I'd like to remove report/group header/footers while at the same time display some of the data from them for each record.

E.g: I have some goods in different warehouses. I want to group it by warehouse ID. While exporting to PDF I want to have warehouse name/ID/address displayed in the group header and for each warehouse display all goods stored in it. Then when I export to XLSX I'd like to have all this information displayed in each row. This way it would  be much easier for the user to analize the data, create some charts etc.

I can achieve this reasult using CSV metadata exporter (I guess it works the same for XLS one) by simply setting the net.sf.jasperreports.export.csv.column.name and net.sf.jasperreports.export.csv.repeat.value for fields I want to keep.

However, some of the users have a lot of data so XLS with its limit isn't enough. Generating CSV and then manually importing it in XLSX isn't an acceptable solution either.

A workaround I can think of is to create another report with much simpler layout containing elements I want to export to XLSX only and then switch in runtime which one to generate.

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...