Cariage return _x000D_

Jul 28, 2011 at 11:37 AM

When I load a string from an Excel cell the returns are not translated correctly. _x000D_ is not converted to \r allthough its followed by a \n which suggests the newline character is converted correctly. Or am I doing something wrong?

Oct 26, 2011 at 6:27 PM

I'm seeing the exact same thing. Line breaks are in the data, but I'm also seeing the literal _x000D_ at every new line.

Debugging, this is the data being reported by OpenXML to ClosedXML. Renaming my Excel file to a .zip and opening xl/sharedStrings.xml itself, I see the same literal _x000D_ in there. Whatever it's doing, Excel is working around it. Anyone know what's going on here? Is this intended behavior and it's a magic string Excel is looking for?

Coordinator
Oct 26, 2011 at 6:45 PM

icrf, please create an issue and attach a sample file that can reproduce the error when it's loaded/saved.

Thanks,

Oct 26, 2011 at 7:24 PM

Upon closer inspection, it looks like there is another character in there that Excel is simply suppressing. When moving the cursor in the cell, it moves to the end of the line, then nowhere, then the beginning of the next line.

The file I'm working with was put together by someone collecting data from many different sources, so it's not at all unreasonable to assume that some of the copied data has been through a couple different unix/windows/mac end line conversions and isn't in the right state.

I'll make an issue and upload a sample so you can take a look.