FarPoint.Win.SpreadJ アセンブリ > FarPoint.Win.Spread.Model 名前空間 > DefaultSheetDataModel クラス : GoalSeek メソッド |
'Declaration Public Function GoalSeek( _ ByVal variableRow As Integer, _ ByVal variableColumn As Integer, _ ByVal formulaDataModel As DefaultSheetDataModel, _ ByVal formulaRow As Integer, _ ByVal formulaColumn As Integer, _ ByVal desiredResult As Double _ ) As Boolean
'使用法 Dim instance As DefaultSheetDataModel Dim variableRow As Integer Dim variableColumn As Integer Dim formulaDataModel As DefaultSheetDataModel Dim formulaRow As Integer Dim formulaColumn As Integer Dim desiredResult As Double Dim value As Boolean value = instance.GoalSeek(variableRow, variableColumn, formulaDataModel, formulaRow, formulaColumn, desiredResult)
public bool GoalSeek( int variableRow, int variableColumn, DefaultSheetDataModel formulaDataModel, int formulaRow, int formulaColumn, double desiredResult )
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = (FarPoint.Win.Spread.Model.DefaultSheetDataModel)fpSpread1.Sheets[0].Models.Data;
fpSpread1.Sheets[0].Cells[1, 1].Formula = "C1+D1";
fpSpread1.Sheets[0].Cells[0, 3].Value = 2;
dataModel.GoalSeek(0, 2, dataModel, 1, 1, 32);
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5) FpSpread1.ActiveSheet.Models.Data = dataModel FpSpread1.Sheets(0).Cells(1, 1).Formula = "C1+D1" FpSpread1.Sheets(0).Cells(0, 3).Value = 2 dataModel.GoalSeek(0, 2, dataModel, 1, 1, 32)