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.