T
Tomas Vera
Hello All,
I'm having trouble writing some special characters to an XML file.
I need to output a XMLSS formatted file to be read by Excel.
In some cells there will be some text that contains CR-LF pairs such
as
"this is a long entry\r\nThis is the secondline".
I'm building an XML document to represent my Excel data. This is
working fine.
Then I'm calling xmlDoc.Save(xmlTextWriter)
to create the output.
The problem is that the \r\n are not denoted in any special manner in
the XML file. So Excel does not recogize the line breaks in the cell.
After some toying with the data, I find that this output would work
best:
<Cell>
<Data ss:Type="String">
This is a long entry
This is the secondline
</Data>
</Cell>
However I don't seem to be able to generate the '
' in the XML
output.
What Value/InnerText do I set on my Text node so that the '
' gets
send to the output XML file?
Any help is appreciated.
-tomas
I'm having trouble writing some special characters to an XML file.
I need to output a XMLSS formatted file to be read by Excel.
In some cells there will be some text that contains CR-LF pairs such
as
"this is a long entry\r\nThis is the secondline".
I'm building an XML document to represent my Excel data. This is
working fine.
Then I'm calling xmlDoc.Save(xmlTextWriter)
to create the output.
The problem is that the \r\n are not denoted in any special manner in
the XML file. So Excel does not recogize the line breaks in the cell.
After some toying with the data, I find that this output would work
best:
<Cell>
<Data ss:Type="String">
This is a long entry
This is the secondline
</Data>
</Cell>
However I don't seem to be able to generate the '
' in the XML
output.
What Value/InnerText do I set on my Text node so that the '
' gets
send to the output XML file?
Any help is appreciated.
-tomas