Description
When trying to use a custom number format with a space as the thousands separator, e.g.:
workbook.add_format(num_format: '# ##0.00 "€"')
FastExcel / libxlsxwriter escapes the space and other special characters, resulting in a format like #\ ##0.00\ €. Excel then displays large numbers incorrectly, e.g., 1200300.99 becomes 1200 300.99.
Steps to reproduce
- Create a FastExcel workbook.
- Add a worksheet and a number format like
# ##0.00 "€".
- Write a number larger than 999,999 with
write_number.
- Open the generated Excel file in Excel.
Expected behavior
The number should display with a proper space as thousands separator, e.g., 1 200 300.99 €.
Actual behavior
The number is split incorrectly because the space is escaped (#\ ##0.00\ €) and interpreted literally by Excel.
Notes
- Using commas (
,) or dots (.) works correctly, e.g., #,##0.00 "€".
- Using a space as thousands separator is not supported due to internal escaping in libxlsxwriter.
Environment
Request
Please consider supporting non-escaped spaces as thousands separators, or provide a recommended workaround for properly displaying numbers with spaces.
Description
When trying to use a custom number format with a space as the thousands separator, e.g.:
FastExcel / libxlsxwriter escapes the space and other special characters, resulting in a format like
#\ ##0.00\ €. Excel then displays large numbers incorrectly, e.g.,1200300.99becomes1200 300.99.Steps to reproduce
# ##0.00 "€".write_number.Expected behavior
The number should display with a proper space as thousands separator, e.g.,
1 200 300.99 €.Actual behavior
The number is split incorrectly because the space is escaped (
#\ ##0.00\ €) and interpreted literally by Excel.Notes
,) or dots (.) works correctly, e.g.,#,##0.00 "€".Environment
Request
Please consider supporting non-escaped spaces as thousands separators, or provide a recommended workaround for properly displaying numbers with spaces.