Created attachment 33149 [details] Full test case; creates a file first per HSSF, then per XSSF to show the different Excel behaviour 1. Applying default column style by Sheet.setDefaultColumnStyle 2. Adding new Cell; but don't set an explicit cell style ==> the default column style seems to be not applied if opening the file with MS Excel 2010. * Notes: a) This works if using a HSSFWorkbook. b) Strange: LibreOffice 4.3.7.2 displays the file as expected. c) Maybe Bug 51037 deals with the same problem, but the description there is to imprecise to reproduce it. * Code snippet: Workbook workbook = new XSSFWorkbook(); Sheet sheet = workbook.createSheet(); // Set default column style to user formatted time & yellow background CellStyle style = workbook.createCellStyle(); style.setDataFormat(workbook.createDataFormat().getFormat("hh:mm:ss")); style.setFillForegroundColor(IndexedColors.YELLOW.getIndex()); style.setFillPattern(CellStyle.SOLID_FOREGROUND); sheet.setDefaultColumnStyle(0, style); // Create one cell; cell contains actual date & time ... Row row = sheet.createRow(0); row.createCell(0).setCellValue(Calendar.getInstance()); * Results when viewing with MS Excel 2010: The HSSF-file shows all cells - including the filled one - with yellow background and formatted as time. In the XSSF-file the filled cell has neither a background color nor a cell format; the other cells of the column are formatted correctly. Full test case appended; creates a file per HSSF & XSSF to show the differences of Excel behaviour.
I'll close this as duplicate of bug 51037 and comment some information from this bug there to not loose it. *** This bug has been marked as a duplicate of bug 51037 ***