I have problem with converting excel formul file to pdf

I'm having a problem evaluating formulas in my Excel file.

My application generates a PDF file from an Excel file. but I'm having a problem with evaluating formulas in my Excel file generated using Syncfusion. therefore the associated boxes on the pdf are empty.

the relevant boxes J19 and J20.

Attached you will find the excel and pdf file.

My form is

=SOMME.SI.ENS(Feuil1!$D:$D;Feuil1!$B:$B;$B19;Feuil1!$C:$C;J$25)

My code c# 

   public static void CalculateFormulaForPdf(IWorkbook workbook)

   {




       foreach (var sheet in workbook.Worksheets)

       {

           sheet.EnableSheetCalculations();


           List<IRange> lstCells = sheet.UsedCells.Where(x => x.HasFormula).ToList();

        

           sheet.Calculate();

           foreach (var cell in lstCells)

           {

               try

               {

               


                   cell.Value = cell.CalculatedValue;



               }

               catch

               {

                   // wrong formula inside

               }

           }

           sheet.DisableSheetCalculations();

       }

THANKS


7 Replies

KM Kurmitha Manickhaperumal Syncfusion Team November 14, 2024 08:52 AM UTC

Hi Aitbouhou Adam,

 

We are currently unable to reproduce the issue. We have attached the sample we tried at our end. Please modify it to reproduce the issue or share the input Excel and PDF documents to help us replicate the problem. This will enable us to resolve the issue more efficiently and find a solution.

 

Regards,
kurmitha M.


Attachment: Formula_5d179a90.zip


AA Aitbouhou Adam November 14, 2024 09:19 AM UTC

Hello 

Thank you for your replay

Attached you will find the Excel and pdf documents


Thanks


Attachment: 6903513f493247828894f98c437110a5_6963b0bf.zip


AS Atchaya Sekar Syncfusion Team November 18, 2024 03:47 PM UTC

Hi Aitbouhou Adam,


We have reproduced the reported issue. The calculated values are returning 0 instead of the actual values. We are currently validating this and will share the validation details by November 20, 2024.


Regards,

Atchaya S.




YV Yaavann Vignesh Sethuraman Syncfusion Team November 20, 2024 04:50 PM UTC

Hi Aitbouhou Adam,


We are currently validating the reported scenario and need more time to validate it. We will provide further details by November 22, 2024.


Regards,
Yaavann.



AS Atchaya Sekar Syncfusion Team November 22, 2024 01:28 PM UTC

Hi Aitbouhou Adam,

 

We have checked the reported issue "SUMIFS formula returns 0 when comparing Date Values in French Culture" as a defect. We have logged a bug, and it will be fixed in our NuGet release scheduled for December 17, 2024.

 

You can track the status of this report through the following feedback link,

Feedback Link: SUMIFS formula returns 0 when comparing Date Values in French Culture in WinForms | Feedback Portal

 

Note: The provided feedback link is private, and you need to log in to view this feedback.

We will let you know once it is released. We appreciate your patience until then.

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

 

 

Regards,

Atchaya S.



YV Yaavann Vignesh Sethuraman Syncfusion Team December 17, 2024 01:17 PM UTC

Hi Aitbouhou Adam

The Vol4 Main release rolled out on December 12th, 2024, due to that there is no weekly release today. The weekly NuGet is postponed to tomorrow (December 18th, 2024).

Regards,
Yaavann.



YV Yaavann Vignesh Sethuraman Syncfusion Team December 19, 2024 02:51 PM UTC

Hi Aitbouhou Adam,

We would like to let you know that Essential Studio Weekly NuGet packages (v28.1.35) has been published in  nuget.org with the fix for the issue "SUMIFS formula returns 0 when comparing Date Values in French Culture". Please let us know if you have any concerns in this.

Root Cause Details:
In the existing implementation , we are directly processing date value to match the criteria ,which results in incorrect outcomes. To resolve this, we are now converting the date value into its equivalent serial number, ensuring it properly matches the criteria and produces accurate results.

Regards,
Yaavann.

Loader.
Up arrow icon