FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > AddCustomName Method : AddCustomName(String,String,Int32,Int32,Boolean,String) Method |
'Declaration Public Overloads Sub AddCustomName( _ ByVal name As String, _ ByVal value As String, _ ByVal baseRow As Integer, _ ByVal baseColumn As Integer, _ ByVal sheetViewScope As Boolean, _ ByVal comment As String _ )
fpSpread1.ActiveSheet.AddCustomName("Alpha", "Sum(A1,A2)", 1, 1, true, "Comment"); fpSpread1.ActiveSheet.SetFormula(1, 1, "Alpha"); fpSpread1.ActiveSheet.SetValue(0, 0, 10); fpSpread1.ActiveSheet.SetValue(1, 0, 10); //Set scope to true for a sheet level custom name //Set scope to false for a workbook level custom name //fpSpread1.Sheets.Count = 3; //fpSpread1.Sheets[0].AddCustomName("Alpha", "Sum(A1,A2)", 1, 1, false, "test"); //fpSpread1.Sheets[0].SetFormula(1, 1, "Alpha"); //fpSpread1.Sheets[0].SetValue(0, 0, 10); //fpSpread1.Sheets[0].SetValue(1, 0, 10); //fpSpread1.Sheets[1].SetFormula(1, 1, "Alpha");
FpSpread1.ActiveSheet.AddCustomName("Alpha", "Sum(A1,A2)", 1, 1, True, "Comment") FpSpread1.ActiveSheet.SetFormula(1, 1, "Alpha") FpSpread1.ActiveSheet.SetValue(0, 0, 10) FpSpread1.ActiveSheet.SetValue(1, 0, 10) 'Set scope to true for a sheet level custom name 'Set scope to false for a workbook level custom name 'FpSpread1.Sheets.Count = 3; 'FpSpread1.Sheets(0).AddCustomName("Alpha", "Sum(A1,A2)", 1, 1, False, "test") 'FpSpread1.Sheets(0).SetFormula(1, 1, "Alpha") 'FpSpread1.Sheets(0).SetValue(0, 0, 10) 'FpSpread1.Sheets(0).SetValue(1, 0, 10) 'FpSpread1.Sheets(1).SetFormula(1, 1, "Alpha")
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8