Invalid formula throws Exception at start

Hello,

I have found a strange behavior where I expect Cells to return the value I see in Excel instead of an error opening the file. No matter that the formula is not correct, but it was correct before, see example.

File
BugDemo.zip (27.5 KB)

Working.xlsx
Please pay attention to C13. The formula is of course wrong with “=D15: D16 ()”, but the behaviour is correct on the part of Cells because it returns #REF! to me.

Exception.xlsx
Same structure but I have deleted (correctly deleted, not erase content) the cells referenced by C13 (D15 & D16). Now Excel deletes the formula of C13, so that it says: Formula: =#REF! and displayed value #REF!.

_workbook = new Workbook("Exception.xlsx");

Error
Aspose.Cells.CellsException was unhandled
HResult=-2146232832
Message=Error in Cell: C13-Invalid formula:"#REF!()".
Source=Aspose.Cells
StackTrace:
bei . (Cell , String , Byte , Boolean )
bei Aspose.Cells.Cell. (String )
bei . ( ​ )
bei . ( ​ )
bei . ( ​ )
bei . ( ​ )
bei . ( , String )
bei . ( , String )
bei . ()
bei . ()
bei . (Workbook , LoadOptions )
bei Aspose.Cells.Workbook. (Stream , LoadOptions , Boolean )
bei Aspose.Cells.Workbook. (String , LoadOptions )
bei Aspose.Cells.Workbook…ctor(String file)

Expectation
I would have expected Cells to return the display name as in Excel instead of a formula error.

@mservdev

Thanks for using Aspose APIs.

We were able to observe this issue and logged it in our database for investigation and for a fix. Once, the issue is resolved or we have some other news for you, we will update you asap.

This issue has been logged as

  • CELLSNET-45951 - Invalid formula throws exception at start

@mservdev

Thanks for using Aspose.Cells.

Please download and try the following fix and let us know your feedback.

@shakeel.faiz

Thank you it works :sunglasses:

@mservdev,

Good to know that your issue is sorted out by the latest version/fix. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

The issues you have found earlier (filed as CELLSNET-45951) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

The issues you have found earlier (filed as CELLSNET-45951) have been fixed in this update. Please also check the following article:* <a href="Install Aspose Cells through NuGet|Documentation