Copy link to clipboard
Copied
Hi, everybody!
I wonder if there's a way —or maybe there's a script that already exist— to convert all columns from all tables in a document to individuals text frames with the same high and widh lenght that had as table columns and preserving the same paragraph style from each cell.
Copy link to clipboard
Copied
Hi,
The following sample script demonstrates getting the information you want from a table.
set colInfo to {}
tell application "Adobe InDesign CC 2018"
set tableRef to table 1 of story 1 of document 1
set colList to columns of tableRef
repeat with i from 1 to length of colList
set thisCol to item i of colList
set celList to cells of thisCol
set wid to width of thisCol
set totHgt to 0
set celInfo to {}
repeat with j from 1 to length of celList
set thisCel to item j of celList
set c to contents of contents of thisCel
set s to applied paragraph style of paragraph 1 of thisCel
set h to height of thisCel
set end of celInfo to {c, s}
set totHgt to totHgt + h
end repeat
set end of colInfo to {celInfo, wid, totHgt}
end repeat
This creates a nested list of lists that you can then parse to create your text frames with contents and styling. Hope this helps.
Copy link to clipboard
Copied
Just by curiosity! … For what use?
Best,
Michel, from FRIdNGE