LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Text to columns in LIbre Office 4.2.8.2 (https://www.linuxquestions.org/questions/linux-software-2/text-to-columns-in-libre-office-4-2-8-2-a-4175596419/)

pwabrahams 12-29-2016 03:30 PM

Text to columns in LIbre Office 4.2.8.2
 
I'm running Libre Office Calc 4.2.8.2. I have a spreadsheet of text cells in which I want to split each cell at a delimiter (newline). I did a search on how to do this and came up with the answer (from several sources) to select the cells, then go to Data/Text to Columns. That ought to work -- except that when I go to the Data menu, Text to Columns is not one of the choices. Is this a version problem? For 4.2.8.2, what is another way to do the same thing? And how do I specify newline as the delimiter? (/n splits it at the letter n.)

hydrurga 12-29-2016 03:36 PM

Just for info, it works on my LibreOffice 5.1.4.2 installation. The functionality has been around for several years so I imagine that it should work in your version.

If you haven't done so already, try selecting only those cells that have your data in them, nothing else, before Data->Text to Columns.

pwabrahams 12-29-2016 04:48 PM

Line break as delimiter
 
How about the other problem: specifying a line break as the delimiter?

hydrurga 12-30-2016 02:13 AM

Normally in Linux a new line is specified by \n, not /n.

The problem here is that if Calc meets a newline in a cell during Text to Columns then it splits the cell into 2 rows in addition to taking the split character into account. Did you not experience this?

pwabrahams 12-31-2016 10:06 PM

Finally gave up
 
Since the file wasn't long, I finally just gave up and manually replaced each newline by a %. (I had fixed the \n versus /n problem but it didn't help.)

hydrurga 01-01-2017 05:21 AM

Quote:

Originally Posted by pwabrahams (Post 5648739)
Since the file wasn't long, I finally just gave up and manually replaced each newline by a %. (I had fixed the \n versus /n problem but it didn't help.)

That sounds like a good move given LibreOffice's apparent inability to do what you wanted. I'm glad you got it sorted.

Another option would have been to copy the data out into your favourite text editor, run a find-replace operation there to replace the newlines by some other separator character such as a tab, and then copy the results back in to LibreOffice.


All times are GMT -5. The time now is 12:15 AM.