https://bz.apache.org/bugzilla/show_bug.cgi?id=58974
Bug ID: 58974 Summary: HSSFCellStyle - style lost when open in Excel 2013 Product: POI Version: 3.13-FINAL Hardware: PC Status: NEW Severity: critical Priority: P2 Component: HSSF Assignee: dev@poi.apache.org Reporter: alen...@163.com The program generates excel using POI and set style using HSSFCellStyle, such as fill background color, set border or display the number in thousand or million unit. The generated excel file's style works fine in Excel 2010 version. However, when open the same file using Excel 2013, some cells' style is lost whilst some are still there. Further we found that the program totally creates around 3000 HSSFCellStyle objects. If we reduce the number of instances of HSSFCellStyle objects. It helps to ease the issue, less cells' style lost. Is it a known issue ? Is there in place solution already ? Sample, import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFDataFormat; import org.apache.poi.hssf.usermodel.HSSFFont; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.util.HSSFColor; HSSFCellStyle lvHcs = wb.createCellStyle(); //wb's class is HSSFWorkbook lvHcs.setAlignment(HSSFCellStyle.ALIGN_GENERAL); lvHcs.setVerticalAlignment(HSSFCellStyle.VERTICAL_BOTTOM); lvHcs.setWrapText(true); lvHcs.setFont(getFont(false, DEFAULT_FONT_SIZE)); lvHcs.setBorderTop(pBorderType); lvHcs.setTopBorderColor(pBorderColor); lvHcs.setBorderLeft(pBorderType); lvHcs.setLeftBorderColor(pBorderColor); lvCell.setCellStyle(lvHcs); //lvCell's class is HSSFCell -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org