We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can I use a CalcQuick instance in a Windows Service?

Thread ID:





61527 May 28,2007 04:40 PM UTC May 29,2007 11:57 PM UTC WinForms 2
Tags: Calculate
Asked On May 28, 2007 04:40 PM UTC


I try this in a test windows service:

Protected Overrides Sub OnStart(ByVal args() As String)

Dim oCalc As New Syncfusion.Calculate.CalcQuick
oCalc("x") = 5
oCalc("y") = 2
oCalc("z") = "=[x] + [y]"
My.Computer.FileSystem.WriteAllText("F:\Escritorio\ServLog.txt", "z es : " & oCalc("z"), True)

End Sub

then, in my text file, I obtain this:

z es : =[x] + [y]

instead of:

z es : 7

But in a console application this same code works fine. Can I use a CalcQuick instance in a Windows Service?

I use Syncfusion Essential Studio

Administrator [Syncfusion]
Replied On May 29, 2007 10:02 PM UTC

Just something to try, not sure whether this will affect this problem or not. After the

Dim oCalc As New Syncfusion.Calculate.CalcQuick

try adding:

CalcEngine.FormulaCharacter = '='

In 4.4 and earlier, there is a problem with this shared (static) field being initialized properly in server code. This has been corrected in 5.1.

Replied On May 29, 2007 11:57 PM UTC

Hi Clay,

I add the lines of code that you suggested and the service now works.

Thank you very much for your help.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon