openXmlSdk insere uma nova linha dentro de um elemento Run
Eu tenho texto dentro doRun
Elemento. Estou tentando substituir o\r
na corda com umline break
.
O texto a seguir
This is an example project for testing purposes. \rThis is all sample data, none of this is real information. \r\rThis field allows for the entry of more information, a larger text field for example purposes
e ainnerXml
doRun
O elemento é traduzido para
<w:rPr xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:rFonts w:cstheme="minorHAnsi" />
</w:rPr>
<w:t xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
This is an example project for testing purposes. This is all sample data, none of this is real information.<w:br /><w:br />This field allows for the entry of more information, a larger text field for example purposes.</w:t>
Quebras de linha não estão sendo inseridas quando o documento é gerado.
Como posso substituir todos os '\ r' dentro do<w:t> </w:t>
com uma quebra de linha?
Eu tentei.
s.InnerXml = s.InnerXml.Replace("<w:br />", "<w:br />");
Também tentei substituí-lo diretamente na string, mas isso também não funciona.
só sai como uma corda
This is an example project for testing purposes. This is all sample data, none of this is real information.<w:br xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" /><w:br xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" />This field allows for the entry of more information, a larger text field for example purposes.