Set criteria for SUMIF in Excel using Aspose.Cells for .NET in C#

Hey Team,

One more for you.

When using SUMIFs, after a CalculateFormula, if the Criteria of the SUMIF is 0 then Cells will analyse correctly. If the Criteria is set as "=0" then it will not recognise 0 as a match (whereas excel does).

Please see my code below and sample file attached.

Oli

Dim license As Aspose.Cells.License = New Aspose.Cells.License()

license.SetLicense("Aspose.Total.lic")

Dim wbkTest As New Workbook()

wbkTest.Open("c:\testing\test11.xls")

MsgBox("B5: " & wbkTest.Worksheets(0).Cells("B5").Value & " // B6: " & wbkTest.Worksheets(0).Cells("B6").Value)

wbkTest.CalculateFormula()

MsgBox("B5: " & wbkTest.Worksheets(0).Cells("B5").Value & " // B6: " & wbkTest.Worksheets(0).Cells("B6").Value)

Hi,

Thanks for providing us sample code with template file.

Yes, it does not recognize "=0" as match case criteria.We will check it if we can enhance the formula calculation engine according to MS Excel standards.

Thank you.

Hi,

Please try the attached version. We have fixed the bug of calculating the function SUMIF according to MS Excel standards.

Thank you.

Thanks, this appears perfect.

Many thanks,
Oli

The issues you have found earlier (filed as CELLSNET-8673) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Note: Just for your knowledge. In the new release v4.8.0, we have merged Aspose.Grid suite to Aspose.Cells for .NET msi installer as Aspose.Grid would be no longer offered as a separate product now. You need to install the installer (uninstall older one first if you have) and use only Aspose.Cells.dll library in your project for your need. You may also take advantage using Aspose.Cells Grid suite though.