Newline character returning as _x00D_ when written to Response

Jun 2, 2011 at 12:12 AM
Hi All,

I am facing a problem with the latest version.
I am using a template file approach, changing a few values and Writing the bytes to Response stream.

The problem is if my sheet has some cells containing Newline characters (ALT + Enter) at the receiving side of the response the file contains some wierd strings as _X00D_.

Please help me here.

Regards,

Ankur

Jun 22, 2011 at 1:36 PM

I have the same problem. When cell value contains new line characters Excel displays substitution _x00D_. By the way substitution is the same for \r and \n.

Editor
Jun 22, 2011 at 1:38 PM

Get the lastest version from trunk.

Coordinator
Jun 22, 2011 at 6:46 PM

Yes, I'll try to fix a new version next week

Jul 18, 2011 at 8:05 PM

Is there a workaround for this issue or when do you think it might be fixed?

Aug 18, 2011 at 6:20 PM

I've downloaded the latest (EPPlus 2.9.0.1) binary from the download section and this does not appear to be fixed.

Anyone come up with a work-around or know when this issue will be resolved?

Editor
Aug 18, 2011 at 6:50 PM
Edited Aug 18, 2011 at 6:52 PM

You need to build your own dll, because Jan didnt release a new version this time, get the lastest version from trunk and open with visual studio.

Today, this is the lastest changeset >> http://epplus.codeplex.com/SourceControl/changeset/changes/82093

Jan 11, 2012 at 3:45 AM

Same problem for me.

More recent version (2.9.0.1).

Jan 11, 2012 at 4:21 AM
mrxrsd wrote:

You need to build your own dll, because Jan didnt release a new version this time, get the lastest version from trunk and open with visual studio.

Today, this is the lastest changeset >> http://epplus.codeplex.com/SourceControl/changeset/changes/82093

 

After download and integrate in my project this error occurs:

The 'worksheet' start tag on line 2 position 2 does not match the end tag of 'xdr:colOff'. Line 2, position 1415.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: The 'worksheet' start tag on line 2 position 2 does not match the end tag of 'xdr:colOff'. Line 2, position 1415.

Source Error:

Line 588:                _worksheetXml.LoadXml(xml.Substring(1,xml.Length-1));
Line 589:            else
Line 590:                _worksheetXml.LoadXml(xml);
Line 591:
Line 592:            ClearNodes();


Source File: C:\Users\Richardson\Documents\Arquivos\Projetos\Excel\epplus-82093\trunk\ExcelPackage\ExcelWorksheet.cs    Line: 590

Editor
Jan 11, 2012 at 10:09 AM
Edited Jan 11, 2012 at 10:14 AM

bassvix,

 

Hi, today 86957 is the lastest changeset. Try this version.

http://epplus.codeplex.com/SourceControl/changeset/view/86957

Jan 11, 2012 at 4:41 PM

Yeap, works fine now.

Thanks.

Jan 12, 2012 at 8:23 PM

Here is my workaround for it:

 if (row[j].ToString().Contains("\r\n"))                                {                                    worksheet2.Cells[i + 1, j + 1].Value = row[j].ToString().Replace("\r\n", String.Empty);                                }                                else                                {                                    worksheet2.Cells[i + 1, j + 1].Value = row[j];                                }                                        

 

Hope it helps.

Amir

Jan 13, 2012 at 1:09 AM

amircharania, after the lastest changeset (86957) all works fine, but we need download and compile, its not the oficial release (by Download in homepage).