We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Incorrect Rendering of Newline and EOL in Strings into Excel Cell

I am reading from a *.doc file with Aspose Words the content of a paragraph using Paragraph.GetText()

I will write that String immediately into a Cell using Aspose Cells utilizing Cells[X,Y].PutValue(string)
The Cells are saved to an *.xlsx file

Within the *.doc file there is a paragraph containing the following text:

which renders into the Excel-Cell like this:
(MS) [0x0B] MAIN

Another one:
Additional Stuff

renders to:
Additional Stuff [0x0C]

How can I fix this issue with the Aspose API as I don’t know howother control-characters will render
into Excel Cells ?
Or should I simply strip off all control-characters from the string ?

parcs IT Consulting

Hi Lars,

Thanks for your inquiry. Please download the latest version of Aspose.Words from here (13.2.0) and use the following code snippet to obtain the text representation of a Paragraph:

string text = doc.FirstSection.Body.FirstParagraph.ToString(SaveFormat.Text);

In case the problem still remains, please attach your input Word document here for testing. I will investigate the issue on my side and provide you more information.

Best regards,