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

Newbie Question #2: Creating Tables

Community Beginner ,
Jul 17, 2019 Jul 17, 2019

Copy link to clipboard

Copied

How do I add a 5 row x 3 column table with headers to a document? I have written a little jsx from existing documents but am having issues understanding how to create new objects.

TOPICS
Scripting

Views

228

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

correct answers 1 Correct answer

Community Expert , Jul 17, 2019 Jul 17, 2019

#target framemaker

var doc, textLoc, tbl;

doc = app.ActiveDoc;

textLoc = new TextLoc (doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf, 0);

tbl = doc.NewTable ("Format A", 3, 5, 1, 0, textLoc);

Note that if the table format specified in the first parameter of NewTable doesn't exist in the document, the table will not be created.

Votes

Translate

Translate
Community Expert ,
Jul 17, 2019 Jul 17, 2019

Copy link to clipboard

Copied

LATEST

#target framemaker

var doc, textLoc, tbl;

doc = app.ActiveDoc;

textLoc = new TextLoc (doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf, 0);

tbl = doc.NewTable ("Format A", 3, 5, 1, 0, textLoc);

Note that if the table format specified in the first parameter of NewTable doesn't exist in the document, the table will not be created.

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