Hi Yegor, I figured out that it was due to bold font. The server is able to measure the font but not when it is bold. Any suggestions on that?
-Dilip -----Original Message----- From: Yegor Kozlov [mailto:[email protected]] Sent: Thursday, April 02, 2009 3:41 AM To: POI Users List Subject: Re: Column auto size not working. autoSizeColumn uses Java2D to measure text. If some of the fonts are not available, JDK uses the default font and the result can be "off". If any fonts are missing in production you need to install them and copy font files to $JAVA_HOME/jre/lib/fonts/. Yegor > Hi List, > > > > I am using an HSSFWorkbook and writing data with different cell styles > to it. Once all the data is written and necessary styles applied, I call > the autoSizeColumn((short)i) method on all the columns of the sheet to > fit contents. This seems to work fine in my local app server, but when > put it in a different server, the columns don't auto-fit. The cells show > ###### instead of the data. I have to resize the column header to see > the data. > > > > Not sure if there are some server settings that needs to be tweaked. > > > > Thanks, > > Dilip Maurya. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
