Hello, I am using the same version and performing the same actions. However, I have never come accross this issue. This is how I do it.
create a font create a style (remeber to see http://poi.apache.org/hssf/quick-guide.html#WorkingWithFonts for resrictions on number of fonts/styles in a workbook) apply the font to the style apply the style to the cells I need autosize the column. In my case, a column does contain cells with difference styles. How are you applying the font to the cell? On 3/26/08, ook? ook! <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm working with POI 3.0.2-FINAL, and I met a stressful problem when > trying > to autosize a column where there's a FONT apply to. I obtain that ugly > exception: > > java.lang.ClassCastException: org.apache.poi.hssf.record.StyleRecord > at org.apache.poi.hssf.model.Workbook.getExFormatAt(Workbook.java:665) > at org.apache.poi.hssf.usermodel.HSSFCell.getCellStyle(HSSFCell.java > :896) > at org.apache.poi.hssf.usermodel.HSSFSheet.autoSizeColumn( > HSSFSheet.java > :1690) > > Does that problem already known? Someone could help me solving that? > > Thank you. >
