As I was using NPOI 2.1.3.1 to create a chart, I stumbled umpon a bug.
The XML written for the charts is Culture dependent. I'm in France so my default Culture uses a coma as a decimal separator instead of a dot. As a consequence, the cached values in the chart's XML have a coma, but Excel uses only dot separated doubles in its XML format, hence the error. You will find enclosed a quick program that creates a simple sheet with the table :
```
[
[0, 0],
[1, 0.5]
]
```
Then it creates the chart with abscissae being the first column and values being the second column. Finally, it writes one file with the French Culture and one with the invariant Culture. I use Excel 2013 and it can open the invariant file with no problem but gives an error while opening the French one.
A quick workaround for people having this issue is to set the current Culture to the invariant Culture before adding the chart to your workbook, and setting it back to your old Culture afterwards.
Best regards, and thanks for NPOI :)
The XML written for the charts is Culture dependent. I'm in France so my default Culture uses a coma as a decimal separator instead of a dot. As a consequence, the cached values in the chart's XML have a coma, but Excel uses only dot separated doubles in its XML format, hence the error. You will find enclosed a quick program that creates a simple sheet with the table :
```
[
[0, 0],
[1, 0.5]
]
```
Then it creates the chart with abscissae being the first column and values being the second column. Finally, it writes one file with the French Culture and one with the invariant Culture. I use Excel 2013 and it can open the invariant file with no problem but gives an error while opening the French one.
A quick workaround for people having this issue is to set the current Culture to the invariant Culture before adding the chart to your workbook, and setting it back to your old Culture afterwards.
Best regards, and thanks for NPOI :)