Ask Your Question
1

Convert Rows (with text) to Columns

asked 2017-03-03 21:44:42 +0200

talkinggoat gravatar image

I am trying to import a list of words, to convert to flashcards, four per-page. I figured out how to convert them to a table, using Table > Convert > Text to Table, but it is a list, only separated by a paragraph. Therefore, writer puts each word in its own row. How can I make writer separate the word list into 2 columns?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-03-04 20:45:29 +0200

If you use AltSearch extension, you may use ([^\n]+)\p([^\n]+)\p regex as search string, and $1\t$2\p as replacement, to convert the text to the form that will be convertible to what you need (convert one-column list to two-columned separated by tabs). Just use this once with "Replace All".

edit flag offensive delete link more

Comments

Clever!
Isn't the $1 LibO specific and AltSearch uses the more common \1 instead in the replacement line?

Lupp gravatar imageLupp ( 2017-03-04 22:28:19 +0200 )edit
0

answered 2017-03-03 22:27:15 +0200

Lupp gravatar image

updated 2017-03-04 19:07:06 +0200

I wouldn't claim I understood exactly what you wanted to achieve.
What structure has your "list of words"? A pair of words per paragraph (as may be default for flashcards)? If so you simply need to assure an unambigous delimiter between the words. The 'Text to Table' tool offers a field 'Other:' where you can enter your space or whatever delimiter you use. If using the space you cannot have phrases in the place of words, of course.

Generally you might be better off with Calc where you have much more powerful tools for tasks of the kind.

(Editing with respect to the comments by @talkinggoat:)
You won't get what you want in 'Writer' using a standard tool, imo. Even using the Extension 'AltSearch' you cannot skip every other paragraph.
It is (rather) simple using Calc, however. You may try this attached example. There are many ways to modify the solution.

edit flag offensive delete link more

Comments

Thanks for the quick response. The text to table tool works flawlessly, however, each word is placed into its own row. If I want 4 flashcards per 8x11" page, I need the table to be 2x2 or 2 rows x 2 columns. It isn't the delimiter that doesn't work, it's re-formatting the output, so that every other word is in the second column. Step 1 is to get Writer to put every other word into a second column or join every other row with the row preceding it, making 2 columns.

talkinggoat gravatar imagetalkinggoat ( 2017-03-03 23:05:42 +0200 )edit

This sound as if I guessed wrongly concerning the structure of your list. Would you mind to tell how it actually is?
I'm afraid, the 'Text to Table' tool isn't interested in words but in delimiters. It will always create a new row for each paragraph in the original selection. You only can split to columns by a different delimiter used in the paragraphs internally.A new columnfor each delimiter even if there is no word in between.

Lupp gravatar imageLupp ( 2017-03-03 23:30:34 +0200 )edit

The structure of the list consists of a single column of words, separated by a paragraph.

talkinggoat gravatar imagetalkinggoat ( 2017-03-04 17:56:45 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-03-03 21:44:42 +0200

Seen: 1,139 times

Last updated: Mar 04 '17