|Summary:||Inconsistent behavior between HSSF, XSSF: Cell.setCellStyle(...)|
|Component:||XSSF||Assignee:||POI Developers List <dev>|
Description Matthew 2009-04-14 03:11:09 UTC
Created attachment 23490 [details] test.xlsm I have two workbooks "test.xlsm" and "test.xls". I write following codes to set the cell "B2" to blank. The result behavior are different, XSSFWorkbook will clear the CellStyle of the blank cell but HSSFWorkbook won't. -- Workbook source = (read "test.xlsm" or "test.xls") Sheet sheet = source.getSheetAt(0); Row row = sheet.getRow(1); Cell cell = row.getCell(0); cell.setCellType(Cell.CELL_TYPE_BLANK); source.write(...); -- The expected behavior should follow HSSFWorkbook, i.e. CellStyle won't be clear since only cell value is set to blank.