Summary: | Cannot open Excel file - XL: Error Message: Too Many Different Cell Formats | ||
---|---|---|---|
Product: | POI | Reporter: | Yuri Abelev <Yuri.X.Abelev> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | critical | ||
Priority: | P3 | ||
Version: | 1.5.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Yuri Abelev
2002-11-27 03:54:16 UTC
Just write your code differently: ... HSSFCellStyle style = wb.createCellStyle(); style.setBorderBottom(HSSFCellStyle.BORDER_THIN); style.setBottomBorderColor(HSSFCellStyle.BLACK); style.setBorderLeft(HSSFCellStyle.BORDER_THIN); style.setLeftBorderColor(HSSFCellStyle.BLACK); style.setBorderRight(HSSFCellStyle.BORDER_THIN); style.setRightBorderColor(HSSFCellStyle.BLACK); style.setBorderTop(HSSFCellStyle.BORDER_THIN); style.setTopBorderColor(HSSFCellStyle.BLACK); style.setAlignment(HSSFCellStyle.ALIGN_CENTER); for (iRow=0; iRow <403; iRow++){ HSSFRow row = sheet.createRow((short)iRow); row = sheet.createRow((short)iRow); for (sCell=0; sCell<10; sCell++){ HSSFCell cell = row.createCell((short)(sCell)); cell = row.createCell((short)sCell); cell.setCellStyle(style); cell.setCellValue("my cell"); } } Jason |