Table of Contents

TTableDefinition Class

Contains the definition of an Excel table.

Syntax

Namespace: FlexCel.Core

public class TTableDefinition

Methods

Name Description
AddColumn Adds a column to a table definition.
This is mostly used for tables without headers; as in the tables with headers, columns will be inferred from the cells in the header.
ClearColumns Clears all column definitions in the table.
ColumnFromId Returns the column definition for an id, or returns a column with Id = -1 and name empty if the id doesn't exist.
ColumnFromName Returns the column definition for a given column name. If tableXls is null, then this method will return the stored column name. If not null and the table has headers, this method will try to get the column name from the cell value of the table headers in the Excel file.

If the column name doesn't exist, this method will return a TTableColumn​Definition(​null, -1);
ColumnFromPos Returns the column at position columnPosition (0 based).
ColumnInGridFromId Returns the position int the Excel grid for a column id. So for example if the table starts at column 10 in Excel, and aId is the second column of the table, this method will return 11. If the id doesn't exists, this method will return -1.
Equals Returns true if this instance is the same as obj.
GetHashCode Returns the hash code of the object.

Properties

Name Description
ColumnCount Returns the number of columns in the table definition.
Comment The comment for the table.
HasAutofilter If true, the table has an autofilter.
HasHeaderRow If true the table has a header row.
HasTotalsRow If true, the table has a Totals row.
Name The name of the table.
Range The range of cells used by the table.
Style The built in style of the table, if any.