1 person found this helpful
Hmmm... tricky one. The quickest way I can think of is to first create a 7 column table, then transpose this to 4 columns (swapping rows/ columns):
- Choose Object > Text Frame Options, and in the General tab, change Number of columns to 1. Click OK.
- Select all the text (Ctrl/Cmd-A) and choose Table > Convert Text to Table
- Set Column and Row Separator to Paragraph and Number of Columns to 7. Click OK. (note: sadly setting the number of columns here to 4 gives a very muddled up table as it uses the text thread order, so it's better to first of all build the 7 column table based on).
- Select the Table and Copy the text (Ctrl/Cmd-C)
- Launch Microsoft Excel, and click in the top left cell and Paste (Ctrl/Cmd-V). And use the following technique to transpose the rows and columns: Transpose (rotate) data from rows to columns or vice versa - Excel
- You can now either Place the Excel spreadsheet as a Table, or else copy and paste the text into an empty text frame and then use Convert Text to Table (with Column set to Tab, and Row to Paragraph in the Convert Text to Table dialog box).
If you do this a LOT, it'll indeed be good to see if someone is willing to develop a Transpose Rows/Columns script for InDesign CC (2017), which means you'd not need to jump out of InDesign into Excel to perform the transpose. There might already be a plug-in around that includes this feature, one of the other forum support crew might be able to supply a link for that one.
It is an interesting problem.
One can export to PDF, in Acrobat, Save as Other, save as a Word document or an Excel spreadsheet, open and copy the text and paste into a frame in ID and convert text to table as well.
it's relative easy to do this by script.
Here the steps in the UI:
1. Add a textframe with a table of four columns.
The number of rows will be the maximum number of paragraphs you have in one of your text frame columns.
2. Select the text in column 1 of your 4-column text frame.
3. Copy to the clipboard.
4. Select cell 1 of column 1 of your table.
Now the cells of column 1 of your table contain one paragraph each.
Repeat with columns 2 to 4.
That will preserve all the formatting details of your text and removes the paragraph signs at the end of the pasted paragraphs.
Yes, I think Uwe has the simplest solution: Copy and paste each column of text into a column of a table. Sometimes simple is the best...unless you have hundreds to do.
Imho, the simplest way is to click "OK"!
Using this "light version" script (without UI) [link to download below], the user will need to previously create (or modify style names):
• a table style, named "TestTable"
• "Red" and "Blue" cell styles, associated to "Red" and "Blue" para styles
• "Table_Anchoring" para style.
When done, just select the text of the future table [without taking in account in the selection the last carriage-return] …
and play the script. Last screenshot, after 4 clicks!
[No need to add blank paras for the column last cells if empty]
The "Pro" version has an UI to choose several kinds of settings (para styles and Table style, table columns width adjustment (on contents), and especially various "batch treatments" (doc, story, text selection, condition)!, useful if hundreds of tables to be treated!
In this last case, the op will just need one click!
Greg, from FRIdNGE
the original poster never came back to comment on our suggestions.
So we really don't know what the exact specifications were and how flexible or unflexible a solution could be.
We only see one use case in the inital post.
Don't get me wrong: I appreciate that you make that script available for download.
But preparing paragraph styles and applying them to text ranges before running that script?
Don't think, that this is very sufficient in this case. If you have to do that you also could add one step after selecting a text range (one by column) and copy the selected text over to a table.
But let's see if the OP comes back eventually and comments on this…
No problem of course! …
Copy/Paste could just be finally a little boring for the op with some thousands of columns! …
Greg, from FRIdNGE