|
|
|
|
|
- Handling a Table programmatically
<Document variable>.InsertTable (Function) In french: <Variable Document>.InsèreTableau
MyDocument is Document <- WP_Table
MyDocument.InsertTable(1, 3, 3)
MyDocument is Document <- WP_Table
MyDocument.InsertTable(WP_Table.Cursor, 3, 2)
Syntax
Inserting a table into a Word Processing document Hide the details
<Result> = <Document>.InsertTable(<Position> [, <Number of columns> [, <Number of rows>]])
<Result>: docFragment variable docFragment variable with the inserted fragment. <Document>: Document variable Name of the Document variable to be used. <Position>: Integer Position where the table will be inserted. This position is expressed in number of characters. <Number of columns>: Optional integer Number of columns in the table. This parameters corresponds to 1 by default. <Number of rows>: Optional integer Number of rows in the table. This parameters corresponds to 1 by default. Remarks Handling a Table programmatically A table in a Word Processing document can be handled by the WLanguage functions for managing arrays. For example:
MyDocument is Document <- WP_ExampleWP
MyDocument.InsertTable(1, 3, 3)
f is docFragment(TT_ExampleTT.Value, TT_ExampleTT.Cursor, 0)
let para <- f.Paragraph[1]
IF para.Table = Null THEN
RETURN
END
doc is Document <- WP_ExampleWP.Value
nIndex is int = Add(para.Table.Rows)
para.Table.Cells[2,2].Content.Text = "I am in cell 2,2"
Delete(para.Table.Rows, 3)
Delete(para.Table.Columns, 3)
Delete(doc.Paragraph, para.ParagraphSubscript)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|