C# Excel interop, put a line break in the text of a cell in a Excel
It was done by either entering "\r\n"
or Environment.NewLine
. And also must remember to make WrapText
property true
in order to make the line breaks visible.
you can add style to cells programically as bellow
worksheet.Cells.Style.WrapText = true;
New line within an Excel cell is the LF character, which is "\n"
in C#.