Click or drag to resize

IListObject Columns Property

Gets collection of all columns of the list object.
Examples
The following code illustrates how to access Columns property of the table:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create table</para><para>IListObject table1 = worksheet.ListObjects.Create("Table1", worksheet["A1:C6"]);</para><para>//Total row</para><para>table1.DisplayTotalRow = true;</para><para>table1.Columns[0].TotalsRowLabel = "Total";</para><para>table1.Columns[1].TotalsCalculation = ExcelTotalsCalculation.Sum;</para><para>table1.Columns[2].TotalsCalculation = ExcelTotalsCalculation.Sum;</para><para>//Save to file</para><para>workbook.SaveToFile("Table.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
IList<IListObjectColumn> Columns { get; }

Property Value

Type: IList IListObjectColumn
See Also