Issue #1130 resolved
The sample code
from openpyxl import Workbook from openpyxl.styles.numbers import FORMAT_TEXT wb = Workbook() wb._named_styles['Normal'].number_format = FORMAT_TEXT wb.save('hello.xlsx')
The expected behavior
- The "Normal" named style's number format is set to "@" (text format)
- All the cells' number format is set to "@" (text format)
The current behavior
- [O] The "Normal" named style's number format is set to "@" (text format)
- [X] All the cells' number format is set to "@" (text format)
- It seems to break the relationship between all cells and the "Normal" style.
- If a cell or a range of cells are set to another style then re-set to this "Normal" style, then the cell's or cells' number format changes into "@" (text format).
- If you didn't try the previous procedure to re-connect cells with this "Normal" style, although the number format of "Normal" style changes, all the cells are not affected. (It should be, and it is in the Excel application.)
- This might be related with
- I'm not sure exactly which component is related with this. It might be
- I've been using Debian (stretch) package and it's only
2.3.x. But I tested this with
2.5.x, too, and got same result.