Floor function returns #NUM! for negative number

Hi,

Looks like Aspose does not match Excel in how it handles negative input for the FLOOR function.

E.g, for “=FLOOR(-2,3)”, Excel returns “-3”. Aspose returns “#NUM!”.

I tested this on the latest 24.4 Nuget package.

@kerbumble
By creating sample file for testing, we are able to reproduce the issue. Found that Floor function returns #NUM! for negative number. Please refer to the attachment. sample.zip (6.0 KB)

The sample code as follows:

Workbook book = new Workbook(filePath + "sample.xlsx");
book.RefreshDynamicArrayFormulas(true);
book.CalculateFormula();
Console.WriteLine(book.Worksheets[0].Cells["A1"].Value);

The output result:

#NUM!

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55640

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thanks, John.

@kerbumble,

You are welcome. Once we resolve the issue or have any other updates, we will let you know here.

@kerbumble,

We are pleased to inform you that your issue has been resolved. The fix/enhancement will be included in an upcoming release (Aspose.Cells v24.5) that we plan to release this week. You will be notified when the next version is released.

Please note that starting from Aspose.Cells for .NET v24.5, we will calculate it according to the file format of the workbook. If the file format is XLS, we will calculate it as “#NUM!”, otherwise, we will calculate it as -3.

Oh wow, fastest service ever! Thank you so much, Aspose Team!

@kerbumble,

You are welcome.

The issues you have found earlier (filed as CELLSNET-55640) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi