Excel export: how to adapt row height to content and spacing before/after
Quote from lekrof on 26. May 2025, 13:50Dear all,
where exactly in Jaspersoft Studio Pro 8.2.0 (hoping for a screenshot) can I find the Excel export setting that sets
- net.sf.jasperreports.export.xls.auto.fit.row = true
and
- which is the correct export setting to create some space before/after each cell entry?
Thanks a lot in advance!
Dear all,
where exactly in Jaspersoft Studio Pro 8.2.0 (hoping for a screenshot) can I find the Excel export setting that sets
- net.sf.jasperreports.export.xls.auto.fit.row = true
and
- which is the correct export setting to create some space before/after each cell entry?
Thanks a lot in advance!
Quote from ThoZi on 26. May 2025, 23:24Hi 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
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
Hi lekrof,
as the documentation tells us, the setting is a global- or report-scope setting:
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
Quote from lekrof on 27. May 2025, 9:57Thanks 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
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