I faced the same problem and narrowed it down a bit.
On my German system with German culture info (i.e. comma as decimal separator), the XML files will be corrupt, regardless of the data type I am trying to write. Diff-ing the worksheet files revealed that this has to do with the basic sheet info being written at the end of the worksheets XML. The code generated on a German machine will be
So I will use a forced US culture info for writing the data streams. This should take care of all file stream issues.
On my German system with German culture info (i.e. comma as decimal separator), the XML files will be corrupt, regardless of the data type I am trying to write. Diff-ing the worksheet files revealed that this has to do with the basic sheet info being written at the end of the worksheets XML. The code generated on a German machine will be
<pageMargins left="0,7" right="0,7" top="0,75" bottom="0,75" header="0,3" footer="0,3"></pageMargins></worksheet>
instead of<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"></pageMargins></worksheet>
Obviously this will throw an error with OpenOffice or Excel. So I will use a forced US culture info for writing the data streams. This should take care of all file stream issues.