Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SXSSFCell: numeric value is serialized with CurrentCulture rules #199

Closed
msvprogs opened this issue Apr 11, 2019 · 1 comment
Closed

SXSSFCell: numeric value is serialized with CurrentCulture rules #199

msvprogs opened this issue Apr 11, 2019 · 1 comment
Labels
Milestone

Comments

@msvprogs
Copy link

msvprogs commented Apr 11, 2019

This leads to broken Excel file when, for example, system culture has different decimal separator:
image

It should be serialized according to InvariantCulture.

https://github.com/tonyqus/npoi/blob/fefa51b20c91034b8e38a4bed53a45032e70e346/ooxml/XSSF/Streaming/SheetDataWriter.cs#L332
https://github.com/tonyqus/npoi/blob/fefa51b20c91034b8e38a4bed53a45032e70e346/ooxml/XSSF/Streaming/SheetDataWriter.cs#L291
You should call ToString(CultureInfo.InvariantCulture) on the numeric variables here.

@tonyqus
Copy link
Member

tonyqus commented Apr 16, 2019

this is a valid bug.

@tonyqus tonyqus added the bug label Apr 16, 2019
@tonyqus tonyqus closed this as completed Feb 25, 2020
@tonyqus tonyqus added this to the NPOI 2.5.0 milestone Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants