This project has moved and is read-only. For the latest updates, please go here.

Insertign line breaks

Feb 16, 2015 at 6:57 PM
According to this post: using "\r\n" in a string should produce a line break in the Excel spreadsheet.

I'm not seeing this behavior. I've just converted my system from using Excel Interop to using EPPlus (it's so much faster! LOVE it!)

But, for example I have this line:
        cell = sheet.Cells[2, 1];
        cell.Value = "AGGREGATED\r\nSUMMARY";
But what I see in the spreadsheet is: "AGGREGATEDSUMMARY"

I have a number of places where I need line breaks.

Thanks for any help.
Feb 16, 2015 at 7:03 PM
Nevermind. Dug a bit deeper. My first searches in the discussion didn't turn it up, but continued searching shows I needed to set cell.Style.WrapText = true;

Awesome library. Thanks for creating it!