PowerTools SPREAD for ASP.NET 8.0J
ErrorExpression コンストラクタ

エラー値
エラー定数値を使用する新規の式を作成します。
構文
'Declaration
 
Public Function New( _
   ByVal value As CalcError _
)
public ErrorExpression( 
   CalcError value
)

パラメータ

value
エラー値
例外
例外説明
System.ArgumentNullExceptionvalue が NULL 参照(Visual Basic の Nothing)です。
次のサンプルコードは、エラーを返します。
FarPoint.CalcEngine.ErrorExpression expr = new FarPoint.CalcEngine.ErrorExpression(FarPoint.CalcEngine.CalcError.NotAvailable);
FarPoint.CalcEngine.Expression[] args = {expr};
FarPoint.CalcEngine.FunctionExpression func = new FarPoint.CalcEngine.FunctionExpression(FarPoint.CalcEngine.FunctionInfo.IsErrorFunction,
args);
//Spread for Windows Forms
((FarPoint.Win.Spread.Model.IExpressionSupport)(fpSpread1.ActiveSheet.Models.Data)).SetExpression(0, 0, func);
MessageBox.Show(FarPoint.CalcEngine.CalcError.Name.ToString());
//Spread for Web Forms
((FarPoint.Web.Spread.Model.IExpressionSupport)(FpSpread1.Sheets[0].DataModel)).SetExpression(0, 0, func);
TextBox1.Text = FarPoint.CalcEngine.CalcError.Name.ToString();
Dim expr As New FarPoint.CalcEngine.ErrorExpression(FarPoint.CalcEngine.CalcError.NotAvailable)
Dim args() As FarPoint.CalcEngine.Expression = {expr}
Dim func As New FarPoint.CalcEngine.FunctionExpression(FarPoint.CalcEngine.FunctionInfo.IsErrorFunction, args)
'Spread for Windows Forms
CType(FpSpread1.ActiveSheet.Models.Data, FarPoint.Win.Spread.Model.IExpressionSupport).SetExpression(0, 0, func)
MessageBox.Show(expr.ErrorValue.Name.ToString)
'Spread for Web Forms
CType(FpSpread1.Sheets(0).DataModel, FarPoint.Web.Spread.Model.IExpressionSupport).SetExpression(0, 0, func)
TextBox1.Text = expr.ErrorValue.Name.ToString()
参照

ErrorExpression クラス
ErrorExpression メンバ

 

 


© 2003-2015, GrapeCity inc. All rights reserved.