Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Created Unassigned: ICell.setCellValue(double) produces invalid value [11936]

$
0
0
Setting a double value to a cell produces an unreadable file on a non-English environment.

For instance, generate your spreadsheet in an application running on a Brazilian Portuguese (pt-BR) thread culture and a value like 60.3 is written as 60,3 to the XLS/XLSX file.

Users can correct this by setting the thread culture to Invariant before calling NPOI and resetting it back to the original culture after using it.

However, this can be fixed in NPOI by specifying invariant culture inside the setCellValue method.

Example:

string text = doubleValue.ToString("G", CultureInfo.InvariantCulture);

Hope to see it fixed in a future release.

Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>