Please or Register to create posts and topics.

Excel export: how to adapt row height to content and spacing before/after

Dear all,

where exactly  in Jaspersoft Studio Pro 8.2.0 (hoping for a screenshot) can I find the Excel export setting that sets

  1. net.sf.jasperreports.export.xls.auto.fit.row = true

and

  1. which is the correct export setting to create some space before/after each cell entry?

Thanks a lot in advance!

kilian.folger has reacted to this post.
kilian.folger

Hi lekrof,

as the documentation tells us, the setting is a global- or report-scope setting:

https://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.xls.auto.fit.row

Set Jasperreports Properties on report scope

But attention! As far as I know, the "...auto.fit..." Excel properties do not work for xlsx, only old xls format.

Instead, I prefer using to widen all columns in the xlsx by a fixed factor (e.g. "1.2"); that should prevent unwanted breaks which differ from the original pdf or internal report view.

Maybe some other props can help like "net.sf.jasperreports.export.xls.font.size.fix.enabled" but I didn´t need/try yet.

And I think unfortunately teher is no property which can influence the text padding in an excel cell; BTW, is that possible in Excel at all? I think there is not really an corresponding excel setting to "box padding" in Jasperreports...

Hope that helps a bit.

Greetings,

Thomas

kilian.folger has reacted to this post.
kilian.folger

Thanks a lot, Thomas!

Setting the auto.fit.row to true solved the problem even in xlxs exports. Still working on the cell padding though..

Best regards,

lekrof

kilian.folger has reacted to this post.
kilian.folger