View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Harald Harald is offline
external usenet poster
 
Posts: 1
Default Creating a line break (newline) in a cell with SpreadsheetML

Hi, while generating cell content I'd like to know how to code a line break in the cell data (datatype string). I'm using XML (Office XML + SpreadsheetML) to generate the Exel sheet and the .net framework 2.0 XML XML classes (XmlDocument, XmlNode, etc.).

I tried to code " " but this unfurtunately resolves to "&amp;#10;" in the resulting file. So I tested to replace "&amp;#10;" with " " (manually, after creating the file), but Excel doesn't recognize that as line feeds until (sic!) entering the cell an pressing <enter. Then, excel does some conversion (but I didn't find any difference in the XML files cell data afterwards) and then accepts the line feed - more sic! :-(

So I need to know how to do that the recommended way. Any idea???
Or any hint where to search such information?

Thx in advance, hd