FarPoint.Win.SpreadJ アセンブリ > FarPoint.Win.Spread 名前空間 > SheetView クラス > AddCustomName メソッド : AddCustomName(String,String,Int32,Int32,Boolean,String) メソッド |
'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")