API Reference
Class
ExcelTable
Lightweight object model wrapper for an Excel table.
Inheritance
- Object
- ExcelTable
Usage
Explore 10 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 10
- Method ExcelRange.CreateTable
- Method ExcelSheet.Table
- Method ExcelTable.AppendDataTable
- Method ExcelTable.ClearTotals
- Method ExcelTable.Rename
- Method ExcelTable.Resize
- Method ExcelTable.SetSchema
- Method ExcelTable.SetStyle
- Method ExcelTable.SetTotals
- Method ExcelTable.SortByColumn
Methods
public ExcelTable AppendDataTable(DataTable table) #Returns:
ExcelTableAppends rows from a data table to the Excel table.
Parameters
- table System.Data.DataTable
public ExcelRange Column(String headerName, Boolean includeHeader = false, Boolean normalizeHeader = true) #Returns:
ExcelRangeResolves a data-column range in this table by its header text.
Parameters
- headerName System.String
- includeHeader System.Boolean = false
- normalizeHeader System.Boolean = true
public ExcelTable Rename(String newName, ExcelTableNameValidationMode validationMode = Strict) #Returns:
ExcelTableRenames this table and its workbook references.
Parameters
- newName System.String
- validationMode OfficeIMO.Excel.ExcelTableNameValidationMode = Strict
public ExcelTable Resize(String newRange) #Returns:
ExcelTableResizes the table, preserving current column names where possible.
Parameters
- newRange System.String
public ExcelTable SetSchema(IReadOnlyList<String> columnNames, String? newRange = null) #Returns:
ExcelTableReplaces the table's ordered column schema and optionally resizes its range.
Parameters
- columnNames System.Collections.Generic.IReadOnlyList<System.String>
- newRange System.String? = null
public ExcelTable SetStyle(ExcelTableStyle style, Boolean? showFirstColumn = null, Boolean? showLastColumn = null, Boolean? showRowStripes = null, Boolean? showColumnStripes = null) #Returns:
ExcelTableApplies a built-in table style and optional style flags.
Parameters
- style OfficeIMO.Excel.ExcelTableStyle
- showFirstColumn System.Boolean? = null
- showLastColumn System.Boolean? = null
- showRowStripes System.Boolean? = null
- showColumnStripes System.Boolean? = null
public ExcelTable SetTotals(IDictionary<String, ExcelTableTotalsFunction> byHeader) #Returns:
ExcelTableApplies totals row functions by header name.
Parameters
- byHeader System.Collections.Generic.IDictionary<System.String, OfficeIMO.Excel.ExcelTableTotalsFunction>
public ExcelTable SortByColumn(Int32 columnOffset, Boolean ascending = true) #Returns:
ExcelTableSorts table rows by a 1-based column offset.
Parameters
- columnOffset System.Int32
- ascending System.Boolean = true
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
public String NameOrRange { get; } #Gets the table name, display name, or A1 range used to locate the table.