Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 443  / 3 Years ago, thu, september 23, 2021, 2:25:05

Let's say we have a series of words separated by commas in a LibreOffice Writer odt document:


"water, air, fire, sky, cloud, rain, snow, ice, wind, sun, moon, star, mountain..."


What is the easiest method to list them in a LO Writer table separated by rows?


Trying to convert them to table (TableConvertText to tableSeparate text at "Other" → selecting , - the result is that the words are separated by columns (where the commas where), but not by rows.


words separated by columns


How to separate them by rows so that they appear as a list?




I am going to do that a lot, that's why I am looking for the "easiest way". I do have a solution but I don't find it easy enough. I am posting it below as an example:


As things are, the "convert to table" option only has options applicable to an existing list with each word on a separate line.


To create the correct lines I have used the addon/extension called "Alternative searching" to replace the spaces between words with Paragraph (ending): p.


Then, the method TableConvertText to tableSeparate text at Paragraph works.


More From » kubuntu

 Answers
2

This solution does what terdon's solution essentially does (which I prefer), but I'm adding it here since it can be done from within LibreOffice Writer, without using a terminal.



  1. Select the comma-separated list you want to convert to a single-column table.



  2. Press Ctrl+H (keyboard alternative for EditFind and Replace...).



  3. In the Find and Replace dialog that opens check Current selection only and Regular expressions and add:


    Find: ,


    Replace:


    Find and replace dialog



  4. Click Replace All.



  5. You should now have your selection as rows of text.



  6. Finally, to convert the rows to a single-column table: TableConvertText to Table... → set Separate Text at to ParagraphOK.






An alternative way is to use LibreOffice Calc to transpose the table (convert columns to rows and rows to columns), since Writer doesn't currently have that option:



  1. Convert the list of the comma-separated words to a table as you described in your question.



  2. Copy the table from Writer and paste it to Calc.



  3. Select the pasted row in Calc and press Ctrl+X to cut it.



  4. right-click on a cell and select Paste SpecialTranspose.



  5. Finally, copy the column with the words from Calc and paste it to Writer.




[#162] Friday, September 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sipwing

Total Points: 245
Total Questions: 100
Total Answers: 118

Location: Aland Islands
Member since Thu, Oct 22, 2020
4 Years ago
sipwing questions
Sun, May 29, 22, 22:00, 2 Years ago
Fri, Jun 24, 22, 08:46, 2 Years ago
Fri, Dec 23, 22, 00:04, 1 Year ago
Tue, Aug 24, 21, 02:55, 3 Years ago
;