后台代码中由公式串直接得到计算结果,真正的脱离spread控件。
就是能替代这个方法的官方内置方法,看介绍,说spread 7 支持了呀
Public Function OnCalcFormularByStr(ByVal formularStr As String) As Object
Dim tmpSheet As New FarPoint.Win.Spread.SheetView
Dim ret As Object
If formularStr.Trim <> "" Then
tmpSheet.Cells(0, 0).Formula = formularStr
ret = tmpSheet.Cells(0, 0).Value
Else
ret = ""
End If
tmpSheet = Nothing
tmpSheet.Dispose()
Return ret
End Function |