• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Indesign Text Frame to Tables

New Here ,
May 21, 2017 May 21, 2017

Copy link to clipboard

Copied

Hi

I have to convert my text frame to table.I am using this script

app.activeDocument.textFrames[0].texts[0].convertToTable("\t","\r");  .

This converts my text frame of one column to table of one column.But I have to convert the text frame of one column to text frame of two columns.how shall I do this using script?

Regards,

Revathi

TOPICS
Scripting

Views

757

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2017 May 21, 2017

Copy link to clipboard

Copied

Hi Revathi,

If you try this with "\t" and expect two columns you need tab characters as column separators in the text.

If there is no one and you like to have an empty column you would add tab characters first and then convert to table.

You could add one at the beginning of every paragraph of your text if the empty column should be the first column or you add one at the end of your first paragraph only if you want the empty column after the text.

Or do you like a different column separator character that is provided in the text?

Then use that character as the first argument of your convertToTable() method.

Regards,

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

LATEST

Hi Lubender,

I have to export the product codes,its price and page number from InDesign document to excel.I have go product code,price and page number by  Table of Contents by using scripts. I get it as text frame with values one by one.I am able to convert it to table as it is.

Aluminum Castings & Extrusions

etrfsf 45 1

edc 79 1

CONFIG2 16 1

CONFIG3 79 1

cg 1

sdsf 1

wer 1

999 21 1

When I convert text  frame to table I get i as

Aluminum Castings & Extrusions
etrfsf1
451
edc1
791
CONFIG21
161
CONFIG31
791
cg1
sdsf1
wer1
9991
211

But what want is shown below I got this by manually altering the table and converted it.But I have to my text frame to table as shown below using scripts.Is it possible?

Aluminum Castings & Extrusions
etrfsf451
edc791
CONFIG2161
CONFIG3791
cg1
sdsf1
wer1
999211

Regards,

Revathi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines