Newbie Question #2: Creating Tables
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.
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.
#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.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.