public class SumCell : FunctionInfo
{
public override string Name { get { return "SumCell"; } }
public override int MinArgs { get { return 0; } }
public override int MaxArgs { get { return 0; } }
public FarPoint.Win.Spread.FpSpread parent { set; get; }
public override object Evaluate(object[] args)
{
try
{
return decimal.Parse(parent.ActiveSheet.Cells[1, 1].Text) + decimal.Parse(parent.ActiveSheet.Cells[2, 1].Text);
}
catch
{
return "计算错误";
}
}
} |
|