Click or drag to resize

IListObjectColumn TotalsRowLabel Property

Gets or sets label of the totals row.
Examples
The following code illustrates how to set a string "Total" to the first column's TotalsRowLabel property to indicate that it's adjacent cell holds sum of the values of it's column:
<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.ShowTotals = 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
string TotalsRowLabel { get; set; }

Property Value

Type: String
See Also