GrapeCity.Xaml.SpreadSheet.Data
SetColumnFormula Method
Example 


The column index of the table footer. The index is zero-based.
The footer text. A null value indicates that the cell value of the sheet is displayed.
Sets the table footer formula with a specified index.
Syntax
'Declaration
 
Public Sub SetColumnFormula( _
   ByVal tableColumnIndex As Integer, _
   ByVal formula As String _
) 
'Usage
 
Dim instance As SheetTable
Dim tableColumnIndex As Integer
Dim formula As String
 
instance.SetColumnFormula(tableColumnIndex, formula)
public void SetColumnFormula( 
   int tableColumnIndex,
   string formula
)

Parameters

tableColumnIndex
The column index of the table footer. The index is zero-based.
formula
The footer text. A null value indicates that the cell value of the sheet is displayed.
Example
This example creates a table.
//Add data
for (var col = 1; col < 6; col++) {
    for (var row = 2; row < 11; row++) {
        GcSpreadSheet1.Sheets[0].SetValue(row, col, row + col);
    }
}

var sTable = GcSpreadSheet1.Sheets[0].AddTable("table1", 1, 1, 10, 5, GrapeCity.Xaml.SpreadSheet.Data.TableStyles.Medium2);
sTable.ShowFooter = true;
//set footer text
sTable.SetColumnFormula(0, "Total");
//set footer formula
sTable.SetColumnFormula(4, "SUM(F3:F11)");
'Add data
For col As Integer = 1 To 5
    For row As Integer = 2 To 10
        GcSpreadSheet1.Sheets(0).SetValue(row, col, row + col)
    Next
Next

Dim sTable = GcSpreadSheet1.Sheets(0).AddTable("table1", 1, 1, 10, 5, GrapeCity.Xaml.SpreadSheet.Data.TableStyles.Medium2)
sTable.ShowFooter = True
'set footer text
sTable.SetColumnFormula(0, "Total")
'set footer formula
sTable.SetColumnFormula(4, "SUM(F3:F11)")
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

SheetTable Class
SheetTable Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options