hozawa Posted October 14, 2014 Share Posted October 14, 2014 Excel has a "Shrink to fit" property so font size is reduced when the content of a cell overflows. (see video http://www.youtube.com/watch?v=xg8zTH7MPrE)Is there any option in JasperReports to set this Excel property when exporting to Excel? I've asked Tibco Jaspersoft Support this and the told me to set the following properties. Settings these properties obviously won't shrink the font size but only increase the height of the cell to display the content.- set net.sf.jasperreports.print.keep.full.text to true in your report- set net.sf.jasperreports.export.xls.font.size.fix.enabled to true in your report Link to comment Share on other sites More sharing options...
Solution hozawa Posted October 19, 2014 Author Solution Share Posted October 19, 2014 I've looked at the source code and it seems there was an attempt to support "Shrink to Fit" but it has not yet be implemented.However, shouldn't net.sf.jasperreports.export.xls.font.size.fix.enabled be set to "false" instead of "true" to enable font size to change dynamically?Furthermore, the current net.sf.jasperreports.export.xls.font.size.fix.enabled is treated as a font property while Shrink to Fit is a cell property. Fixintg XlsxStyleHelper, XlsxSytleInfo, XlsxCellHelper, JRXlsxExporter, and JRXlsAbstractExporter fixed the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now