Jump to content
We've recently updated our Privacy Statement, available here ×

Border on XLSX export is missing


christoph.poelsterl_1

Recommended Posts

Hello everybody,

I am having problems with the XLSX exporter of our reports. In our companie's report development it is a common use-case to add empty static fields and just configure borders to it. (Also: They are set to be "transparent"). This way we separate f.e. some header information from the actual content. This is our working environment:

  • Jaspersoft Studio 6.10
  • JasperReports Server 7.2
  • OpenJDK 8

On report level we configured this parameters:

  • net.sf.jasperreports.export.xls.ignore.cell.background = true
  • net.sf.jasperreports.export.xls.ignore.cell.border = false
  • net.sf.jasperreports.export.xls.ignore.graphics = false
  • net.sf.jasperreports.export.xls.white.page.background = false

Maybe also important: The properties are only configured on reportbook, not on the included subreports.

Exporting the finished reportbook to XLSX is not showing any borders. The rest of the configuration is fine. But if I am exporting to XLS the borders are there. I also tried to configure it in the applicationContext.xml but that did not change anything also.

Any help or hints what I am doing wrong is highly appreciated.

 

Best regards,
Christoph

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

After searching for weeks now, I figuered out what is wrong. The behaviour of the property net.sf.jasperreports.export.xls.ignore.cell.background is different for XLS and XLSX.

  • XLS: Really only controlling the background/color of a cell
  • XLSX: Seems to be more a flag for "ignore any style for cell"

Meaning: Changing this property to false (instead of true like in my original post here) fixed the problem. Borders are now also shown in XLSX.

Maybe I misunderstood the purpose of ignoreCellBackground but my understanding of the property is "make every cell background transparent". Cell border is not part of the background in my opinion. This is extremly misleading and also quite hard to find out.

Dispite that I would expect no difference for my original configuration between the XLS and XLSX exporter because Excel is Excel. So this is a bug from my point of view.

Link to comment
Share on other sites

  • 5 months later...

I found myself with the same problem. Using your properties as a guide I've narrowed it down to just the property:

net.sf.jasperreports.export.xls.white.page.background

Setting that to false resolved the issue for me.

And I completely agree the documentation is very misleading here.

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