Description
Represents a table in the Word document.
C#
vb.net
Remarks
To create a new table, use Element.InsertTableBefore() or InsertTableAfter(). To get an existing table, use Element.GetElements or Element.Children and check which elements are of type Element.Type.Table.
The following sample demonstrates inserting a new table at the end of a document as well as finding the first table in a document.
Examples
C#
vb.net
Properties
Name |
Description |
---|---|
Returns an AbsolutePositioning object on which you can control the absolute positioning for the table. | |
Sets or returns a TableFormatting object representing the formatting of this table (borders, padding, shading, etc). | |
Returns an int representing the number of rows in the first row of this table. |
|
The page Table.PreferredWidth could not be found. | |
Sets or returns a NamedStyle object that represents the Style of the current table. |
Indexers
Name |
Description |
---|---|
Returns a TableCell object that represents the table cell that exists at the given column and row. |
Methods
Name |
Description |
---|---|
Adds a specified number of columns to the horizontal end of the table. | |
Adds a specified number of rows to the vertical end of the table. | |
Creates a bookmark on the specified row using the specified name. | |
{excerpt-include:Table.DeleteColumns(Int32, |
|
Deletes one or more rows from the table. | |
Returns the number of columns in the specified row of the table. | |
Returns an int representing the width of a particular column. The GetPreferredColumnWidth method returns the width of the column in twips. One twip = (1/20 pt) or (1/1440 in). |
|
Returns a TableCell.WidthUnits object that represents the units used for the width of a particular column. | |
Returns a double that represents the preferred width of this cell, with the associated units return in units. |
|
Returns an int representing the height of a particular row in the table. The default row height unit is twips. One twip = (1/20 pt) or (1/1440 in). |
|
Returns or a boolean that represents if the row height is "exact" (true) or "at least" (false). |
|
Imports data from an array of objects to the current table. | |
Inserts one or more columns at the specified position in the table. | |
Inserts one or more rows at the specified position in the table. | |
Merges the specified set of cells into a single cell. | |
Sets an int representing the width of a particular column. In order to set the width of a column, you must first set the PreferredColumnWidthUnit of that column. |
|
Sets a TableCell.WidthUnits object that represents the units used for the width of a particular column. | |
Sets the preferred width of the table and the units for said width. |
|
Sets an int representing the height of a particular row in the table. A row height is set in twips. One twip = (1/20 pt) or (1/1440 in). |
|
Sets a boolean that represents if the row height is "exact" (true) or "at least" (false). |