Hello,
Using Aspose.Cells for C++ 24.2.0
A pointer exception occurs when saving an Excel file to XLS format (Aspose::Cells::SaveFormat::Excel97To2003) when the Excel file contains Defined Names with an invalid expression (Refers To).
In Excel : Formulas / Name Manager.
For example, if the open file is an XLSX file where xl/workbook.xml contains a defined name like <definedName name="xxx">{#N/A,#N/A,FALSE,"EXCISE"}</definedName>
Test steps :
- Open the XLSX input file (containing a Defined Name with invalid RefersTo expression)
- Try to Save in Aspose::Cells::SaveFormat::Excel97To2003 format
sample_invalid_defined_name.zip (6.3 KB)
There is no way to catch the error as it is not an exception but a pointer issue (crash).
Note that removing Defined names that start with “={” allows us to work around the crash.
The sample is inspired by a real-life use case where the client XLSX file contains invalid defined names.