Retaining line breaks when pasting multi-row text form Calc

Hello! In Excel this worked by itself, but I am having this problem ever since moving to LibreOffice.
For example, I have following information set in Calc

  Column  A

Row 1


              My name


Row 2

             I live...


Row 3

              My age

Now when I copy a single cell and paste it into a notepad linebreaks are preserved.


              My name


When I copy multiple rows at once and paste them… Linebreaks from inside cells are gone

            Hello! My name is...

             I live... in...

How do I keep the linebreaks when pasting?

Did you try Edit > Paste Special > Paste Special > Rich Text Formatting (RTF)?

Hmmm, a kind of workaround:
You can prepare a range in your spreadsheet using the formula =SUBSTITUTE(A1;CHAR(10);CHAR(13)) and respective. Copying this range and pasting it into the plain text editor should do as you want.

(Calc cells use U+000A for internal line breaks.)
And: Line breaks in spreadsheet cells should be avoided. For decades they were not accepted at all.

A good solution was to create another cell with this function:


This way the new cell contains collective information from all of the cells and retains the line breaks

To anyone who is struggling with the same issue!

Clever Idea! However, if your version of LibO is 5.4 or higher:

Eveb better use =TEXTJOIN(CHAR(10);1;A1:A3).
It’s simpler to enter / edit and clearer to the eye.