Line breaks within a Cell

Copper Contributor

I have some text (in .txt format) that I wish to enter into a cell.  The text contains "new lines" (hex 0A I think) and as a result a copy and paste approach makes the text enter into several cells in a column instead of just one cell.  How do I insert all this text into the one cell?

I have tried inserting an <alt><enter> into the text first in place of the strait return but this doesn't do the job.

 

I am using Excel 2016 for the Mac.

5 Replies

@davjam2019 Make sure you switch on Wrap text

Screenshot 2021-06-22 at 12.10.22.png

for all cells that contain the line feeds (i.e. Alt-Enter or CHAR(10) ).

All cells in the sheet are formatted to "text" and "wrap".
The text file is created in Apple Notepad.app and the line feeds are type in as <alt><enter>. I have checked the hex code (using another program) and the line feeds are hex 0A decimal 10.
It's not working... :(

@davjam2019 On a Mac myself. Don't really know which app you refer to. Can you upload an example of a text file with line feeds and explain how you would want to show it in Excel.

I have finally managed to make a short 4 line text to paste into one cell. But I notice anything greater than 25.5 lines isn't visible - the max line height appears to be 409 pix. The app I referred to is the Notepad app that comes with the Mac. It's an Apple app that is very useful for creation of small .txt files.

The reason I need this is that I am creating csv files using Excel to upload onto a database. These files have a heading and a body. The heading is general stuff such as filename, owner, date etc plus a comments field which is what I'm trying to fill with this text. The body is the normal record lines with fields of data. So the whole thing is formatted "text" and "wrap" (with the exception of two "date" fields in the header.
I think I may have to simply add the text I need into the comments field in the csv file after I create it!

@davjam2019 Sorry! Have no clue what you are talking about.