Click or drag to resize

Table Class

Represents a table within a document, inheriting from BodyRegion and implementing ITable and ITableWidget interfaces.
Inheritance Hierarchy

Namespace: Spire.Doc
Assembly: Spire.Doc (in Spire.Doc.dll) Version: 13.2.3.0 (13.2.3.3046)
Syntax
public class Table : BodyRegion, ITable, 
	ICompositeObject, IDocumentObject

The Table type exposes the following members.

Constructors
Name Description
Public method Table(IDocument)
Initializes a new instance of the Table class.
Public method Table(IDocument, Boolean)
Initializes a new instance of the Table class.
Public method Table(IDocument, Boolean, Single)
Initializes a new instance of the Table class with the specified document, border visibility, and line width.
Top
Properties
Name Description
Public property ChildObjects
Gets the child entities.
(Overrides DocumentObject ChildObjects .)
Public property ColumnWidth
Gets or sets the width of each column.
Public property DefaultColumnsNumber
Gets or sets the default column count of per row.
Public property DefaultColumnWidth
Gets or sets the default width of each column.
Public property DefaultRowHeight
Gets or sets the default row height, the unit of measure is point, 1point = 0.3528 mm
Public property DeleteRevision
Gets the delete revision for this objects. Note this can be null. If null does not have delete revision.
(Inherited from BodyRegion .)
Public property Document
Gets the document.
(Inherited from OwnerHolder .)
Public property DocumentObjectType
Gets the type of the document object.
(Overrides DocumentObject DocumentObjectType .)
Public property FirstChild
Gets the first child of the Element.
(Inherited from DocumentObject .)
Public property FirstRow
Get first row of the table.
Public property Format
Gets the table format. Please use it after calling the RestCells method.
Public property IndentFromLeft
Gets or sets indent from left for the table.
Public property InsertRevision
Gets the insert revision for this objects. Note this can be null. If null does not have insert revision.
(Inherited from BodyRegion .)
Public property IsComposite
Indicating whether this instance is composite.
(Inherited from DocumentObject .)
Public property IsDeleteRevision
Gets a value indicating whether this item was deleted from the document.
(Inherited from BodyRegion .)
Public property IsInsertRevision
Gets a value indicating whether this item was inserted to the document.
(Inherited from BodyRegion .)
Public property Item
Get table cell by row and column indexes.
Public property LastCell
Get last cell of the table
Public property LastChild
Gets the last child of the Element.
(Inherited from DocumentObject .)
Public property LastRow
Get last row of the table.
Public property NextSibling
Gets the next sibling.
(Inherited from DocumentObject .)
Public property Owner
Gets the owner of this entity.
(Inherited from DocumentObject .)
Public property OwnerTextBody
Gets the owner text body.
(Inherited from BodyRegion .)
Public property PreferredWidth
This property specifies the preferred horizontal width of a table.
Public property PreviousSibling
Gets the previous sibling.
(Inherited from DocumentObject .)
Public property Rows
Get the table rows
Public property TableDescription
Gets or sets the table description.
Public property TableFormat Obsolete.
Gets the table format. Please use it after calling the RestCells method.
Public property TableStyleName
Gets table style name.
Public property Title
Gets or sets the table title.
Public property Width
Gets the table width
Protected property XDLSHolder (Inherited from DocumentSerializable .)
Top
Methods
Name Description
Public method AddCaption
Add Caption for current Table
Public method AddRow
Adds a row to table
Public method AddRow(Boolean)
Adds new row to table.
Public method AddRow(Int32)
Adds a row to table with copy format from the current last row, and then add columnsNum cells to the new row.
Public method AddRow(Boolean, Boolean)
Adds a row to table with copy format option
Public method AddRow(Boolean, Int32)
Adds a row to table with copy format option
Public method ApplyHorizontalMerge
Applies horizontal merging for cells of table row.
Public method ApplyStyle
Applies the built-in table style.
Public method ApplyTableStyle
Applies the table style properties to table and cell.
Public method ApplyVerticalMerge
Applies the vertical merge for table cells.
Public method AutoFit
Determines how Microsoft Word resizes a table when the AutoFit feature is used.
Public method ClearBorders
Clears the borders of all rows and cells in the table.
Public method Clone
Clones this instance.
Protected method CloneImpl (Overrides DocumentSerializable CloneImpl .)
Protected method CreateLayoutInfo (Overrides DocumentBase CreateLayoutInfo .)
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object .)
Public method Find
Finds text by specified pattern.
(Overrides BodyRegion Find(Regex) .)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Protected method GetNextInSection (Inherited from BodyRegion .)
Public method GetNextWidgetSibling
Gets the next sibling.
(Inherited from DocumentObject .)
Public method GetPreviousWidgetSibling
Gets the previous widget sibling.
(Inherited from DocumentObject .)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Protected method InitXDLSHolder (Overrides DocumentSerializable InitXDLSHolder .)
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Protected method ReadXmlAttributes (Overrides DocumentSerializable ReadXmlAttributes(IXDLSAttributeReader) .)
Protected method ReadXmlContent (Inherited from DocumentSerializable .)
Public method RemoveAbsPosition
Removes the absolute position data. If table has absolute position in the document, all position data will be erased.
Public method Replace(Regex, TextSelection)
Replaces by specified pattern.
(Overrides BodyRegion Replace(Regex, TextSelection) .)
Public method Replace(Regex, String)
Replaces all entries of matchString regular expression with newValue string.
(Overrides BodyRegion Replace(Regex, String) .)
Public method Replace(Regex, TextSelection, Boolean)
Replaces by specified pattern.
(Overrides BodyRegion Replace(Regex, TextSelection, Boolean) .)
Public method Replace(String, String, Boolean, Boolean)
Replaces by specified matchString string.
(Overrides BodyRegion Replace(String, String, Boolean, Boolean) .)
Public method ResetCells(Int32, Int32)
Resets rows / columns numbers.
Public method ResetCells(Int32, Int32, RowFormat, Single)
Resets rows / columns numbers.
Protected method RestoreReference (Inherited from DocumentSerializable .)
Public method SetBorder
Sets the border for the specified border positions and style.
Public method SetBorders
Sets the borders for all possible border positions in the table with the specified style, line width, and color.
Public method SetColumnWidth
Sets the width of all cells in the current column of the table.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Public method ToString(String)
Exports the name and index in container of the object into a string in the specified seperator.
(Inherited from DocumentObject .)
Protected method WriteXmlAttributes (Overrides DocumentSerializable WriteXmlAttributes(IXDLSAttributeWriter) .)
Protected method WriteXmlContent (Inherited from DocumentSerializable .)
Top
Fields
Name Description
Protected field m_doc (Inherited from OwnerHolder .)
Top
See Also