andypandyswe
Programmer
Hi,
I've got a datagrid that i want to write to an xml -file (in the code) that will later be opened in excel.
I've created an excel -file that looks like the result I want to get, then saved it as an XML -file (exceloutput.xml) and opened it in notepad to see what it looks like.
I've then written the code that writes the datagrid to a file called myoutput.xml that looks exactly like (at least in notepad) the one excel generated (exceloutput.xml).
In exceloutput.xml (when opened in excel) I have four different values in each cell, one on top of the other. When you open it in notepad excel has put an "&" followed by "#10;" (ampersand, sharp, ten, semicolon)inbetween each value which I guess is a linebreak (I can't write them together in this topic -form because they disappear when I preview my question). It might look something like this:
However when i replicate this code in my own myoutput.xml and open it with excel, the values don't end up on top of eachother but in a line after oneanother with a small square inbetween them!
Anyone smart out there who knows why this is and how I can fix it?
If so, thanks a million in advance.
Andreas
P.s.
I've opened exceloutput.xml from within my app and asked it what encoding it is and it says UTF8. I've then tried to set my own file (myoutput.xml) to UTF8 also but the problem remains!
D.s.
I've got a datagrid that i want to write to an xml -file (in the code) that will later be opened in excel.
I've created an excel -file that looks like the result I want to get, then saved it as an XML -file (exceloutput.xml) and opened it in notepad to see what it looks like.
I've then written the code that writes the datagrid to a file called myoutput.xml that looks exactly like (at least in notepad) the one excel generated (exceloutput.xml).
In exceloutput.xml (when opened in excel) I have four different values in each cell, one on top of the other. When you open it in notepad excel has put an "&" followed by "#10;" (ampersand, sharp, ten, semicolon)inbetween each value which I guess is a linebreak (I can't write them together in this topic -form because they disappear when I preview my question). It might look something like this:
Code:
...
<Cell ss:StyleID="s21">
<Data ss:Type="String">
value1 value2 value3 value4
</Data>
</Cell>
...
However when i replicate this code in my own myoutput.xml and open it with excel, the values don't end up on top of eachother but in a line after oneanother with a small square inbetween them!
Anyone smart out there who knows why this is and how I can fix it?
If so, thanks a million in advance.
Andreas
P.s.
I've opened exceloutput.xml from within my app and asked it what encoding it is and it says UTF8. I've then tried to set my own file (myoutput.xml) to UTF8 also but the problem remains!
D.s.