GrapeCity.Xaml.SpreadSheet.Data
SetCustomName(String,Int32,Int32,CalcExpression) Method
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class > SetCustomName Method : SetCustomName(String,Int32,Int32,CalcExpression) Method
The custom name.
The base row.
The base column.
The expression to set.
Sets a custom name using the specified expression.
Syntax
'Declaration
 
Public Overloads Sub SetCustomName( _
   ByVal name As String, _
   ByVal baseRow As Integer, _
   ByVal baseColumn As Integer, _
   ByVal expression As CalcExpression _
) 
'Usage
 
Dim instance As Worksheet
Dim name As String
Dim baseRow As Integer
Dim baseColumn As Integer
Dim expression As CalcExpression
 
instance.SetCustomName(name, baseRow, baseColumn, expression)
public void SetCustomName( 
   string name,
   int baseRow,
   int baseColumn,
   CalcExpression expression
)

Parameters

name
The custom name.
baseRow
The base row.
baseColumn
The base column.
expression
The expression to set.
Example
This example uses the SetCustomName method.
gcSpreadSheet1.Sheets[0].SetValue(0, 0, 1);
gcSpreadSheet1.Sheets[0].SetValue(0, 1, 2);
gcSpreadSheet1.Sheets[0].SetValue(0, 2, 3);
gcSpreadSheet1.Sheets[0].SetCustomName("customName1", 0, 0, new GrapeCity.CalcEngine.Expressions.CalcDoubleExpression(12));
gcSpreadSheet1.Sheets[0].SetCustomName("customName2", 0, 0, "Average(20,45)");
gcSpreadSheet1.Sheets[0].SetCustomName("customName3", 0, 0, 1, 3);
gcSpreadSheet1.Sheets[0].SetFormula(1, 0, "customName1");
gcSpreadSheet1.Sheets[0].SetFormula(1, 1, "customName2");
gcSpreadSheet1.Sheets[0].SetFormula(1, 2, "sum(customName3)");
GcSpreadSheet1.Sheets(0).SetValue(0, 0, 1)
GcSpreadSheet1.Sheets(0).SetValue(0, 1, 2)
GcSpreadSheet1.Sheets(0).SetValue(0, 2, 3)
GcSpreadSheet1.Sheets(0).SetCustomName("customName1", 0, 0, New GrapeCity.CalcEngine.Expressions.CalcDoubleExpression(12))
GcSpreadSheet1.Sheets(0).SetCustomName("customName2", 0, 0, "Average(20,45)")
GcSpreadSheet1.Sheets(0).SetCustomName("customName3", 0, 0, 1, 3)
GcSpreadSheet1.Sheets(0).SetFormula(1, 0, "customName1")
GcSpreadSheet1.Sheets(0).SetFormula(1, 1, "customName2")
GcSpreadSheet1.Sheets(0).SetFormula(1, 2, "sum(customName3)")
See Also

Reference

Worksheet Class
Worksheet Members
Overload List