Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Jul 27, 2017 11:51 am

Hello,

I get a worong result with CaculateFormulaValue() method with some values.

Code: Select all
var workbook = new Workbook();
var formule = "50000.10 < 50000";
var result = (bool)workbook.CaculateFormulaValue(formule); // result = false : OK
formule = "49999.10 < 50000";
result = (bool)workbook.CaculateFormulaValue(formule); // result = true : OK
formule = "1404129.7076516 < 50000";
result = (bool)workbook.CaculateFormulaValue(formule); // result = true : Fail


Do you reproduce the issue ?

Thanks

VincentB
 
Posts: 120
Joined: Thu Sep 15, 2016 9:44 am

Fri Jul 28, 2017 2:37 am

Hello VincentB,

Thanks for your inquiry.
After an initial test with the latest hotfix(Spire.XLS Pack Hotfix Version:7.12.55), I got the correct result on my side. Please use this version to have a try.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Fri Jul 28, 2017 8:03 am

Hello,

I have install the latest hotfix but i always reproduce the isssue.
The comparison is valid if it's make on integer values.

Code: Select all
var formule = "1404129 < 50000";
var result = (bool)workbook.CaculateFormulaValue(formule); // result = false OK
formule = "1404129.7076516 < 50000";
result = (bool)workbook.CaculateFormulaValue(formule); // result = true Fail


Problem maybe come from decimal values.
Do you have the same result ?

Thanks

VincentB
 
Posts: 120
Joined: Thu Sep 15, 2016 9:44 am

Fri Jul 28, 2017 8:29 am

Hello VincentB,

I still get the correct result. See the below screenshoot.
11227.png
11227.png (14.27 KiB) Viewed 8382 times

Please check your dlls again, below are the details in the latest 7.12.55.
Spire.XLS.dll 7.12.55.6040
Spire.Pdf.dll 3.9.222.6040
Spire.License.dll 1.3.6.40
Spire.Common.dll 1.2.693.6040

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Wed Aug 02, 2017 8:06 am

Hello VincentB,

How is the issue now?
Could you please give us some feedback at your convenience?

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Aug 07, 2017 1:11 pm

Hello,

We check again our dll, and it's still failling.
We work on French computer.

if we call the line bellow befor our test, it's work, so it's depend on culture :
Code: Select all
 Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;


Code: Select all
            var workbook = new Workbook();

            var formule = "50000.10 < 50000";
            var result = (bool)workbook.CaculateFormulaValue(formule); // result = false : OK

            formule = "49999.10 < 50000";
            result = (bool)workbook.CaculateFormulaValue(formule); // result = true : OK

            formule = "1404129 < 50000";
            result = (bool)workbook.CaculateFormulaValue(formule); // result = false : OK

            formule = "1404129.7 < 50000";
            result = (bool)workbook.CaculateFormulaValue(formule); // result = true : Fail


Best regards

VincentB

VincentB
 
Posts: 120
Joined: Thu Sep 15, 2016 9:44 am

Tue Aug 08, 2017 2:08 am

Hello VincentB,

I have reproduced the issue when I set the language and region to French(France). Anyway, I have referred this issue to our dev team, once there's any good news, I will let you know.
So sorry for the inconvenience caused.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Tue Aug 22, 2017 5:55 am

Hello VincentB,

Glad to inform that the hotfix is available now, please download the Spire.XLS Pack Hotfix Version:7.12.76 to have a check.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Wed Aug 23, 2017 9:36 am

Hello,

I have test Spire.XLS Pack Hotfix Version:7.12.76
and tests send before works !

Code: Select all
formule = "1404129.7076516 < 50000";
result = (bool)workbook.CaculateFormulaValue(formule); // result = true : Correct !


But i have issues with others conditions, for example LessOrEquals :
Code: Select all
var formule = "1404129.7076516 < 0";
var result = (bool)workbook.CaculateFormulaValue(formule); // result = false : OK
formule = "1404129.7076516 <= 0";
result = (bool)workbook.CaculateFormulaValue(formule); // result = true : Fail


So like said precedently, i set CultureInfo.InvariantCulture when i use CaculateFormulaValue and it seems to work !

Thanks

VincentB
 
Posts: 120
Joined: Thu Sep 15, 2016 9:44 am

Wed Aug 23, 2017 10:02 am

Hello VincentB,

Thanks for your inquiry.
I have noticed the issue and logged it to our dev team. Once there's any good news, I will let you know.
Sorry for the inconvenience caused.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Thu Sep 28, 2017 7:06 am

Hello VincentB,

Glad to inform that your issue has been resolved and the hotfix is available now. Please download Spire.XLS Pack Hotfix Version:7.12.90 to have a test.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Oct 09, 2017 9:19 am

Hello,

Greetings from E-iceblue.
Did the hotfix resolve your issue?
Thanks in advance for your valuable feedback and time.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Oct 10, 2017 2:16 pm

Hello,

Issue seems corrected !!

Thanks

VincentB
 
Posts: 120
Joined: Thu Sep 15, 2016 9:44 am

Wed Oct 11, 2017 1:24 am

Hello VincentB,

Thanks for your feedback.
Please feel free to contact us if you need any help.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.XLS

cron