https://bz.apache.org/bugzilla/show_bug.cgi?id=66679
Bug ID: 66679 Summary: Cells without explicit style use column style as default Product: POI Version: 5.2.3-FINAL Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: martin.schloe...@x-map.de Target Milestone: --- Created attachment 38597 --> https://bz.apache.org/bugzilla/attachment.cgi?id=38597&action=edit Cell D3 doesn't have "s" attribute and falls back to column style. When a cell has no style of its own, but the column has a style set, POI will return the column style when Cell.getCellStyle() is called. While this does sound reasonable, the problem is that this is different from what Excel displays. Excel will show "Standard" style on these cells. This is potentially caused by Bug 56011. These cells can be created in Excel by setting a style on a column and then deleting a cell on it and moving trailing cells (without style) to the left. The result will be a cell with no style. The only workaround is to explicitly set "Standard" format on this cell. See cell D3 in attached Test.xslx. My understanding is that Excel uses the column style only to initialize new cells, e.g. when a row is inserted. When cells get moved around they keep their style and fall back to default style in case they have no style set. NB: I'm using the german version of Excel and some terms may be different. -- 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