In our application we are using aspose.slides to fill powerpoint documents, defined by the user, with data from our backend, when using charts with certain formulars in the datasheet apsose throws an exception on saving the document. (which did not happen in earlier versions)
I am using Aspose.Slides 21.4
When saving a Presentation, where a slide contains chart which is using IF or OR functions in its data areas
Exception: Aspose.Slides.Spreadsheet.CellUnsupportedDataException: The cell 'temp'!F4 contains an unsupported formula.
This error did not exist in previous version of Aspose(19.8), there I had to use Aspose.Cell to recalculate the workbook and reapplied it to the chart. When the calculation was not successfully the chart went in the document without a view update, this happened without an error from the aspose side, this was also not ideal, but still better than how it is now.
There are a few issues I have with this error:
Why does this error happen at saving and not earlier. This error should happen at the moment when I modify the chart, not on saving the document.
At the moment our generator is at the mercy that the user did not use any unsupported formular. Currently Report that was generated totally fine, can crash because of one lousy chart. And I am not even able to choose to catch this errors so I could add an error message to the chart and have an otherwise fine working document
Why does it happen at all? We are talking about IF and OR functions which are two of the most basic spreadsheet functions.
Can I disable the processing of the charts onSave so it would use the cached values in the spreadsheet provided by Aspose.Cells? And atleast the generation would not crash
Currently our only workaround for this error is to not use the charts or the unsupported formular. Which defeats the point of using it.
Thank you for the project example. I reproduced the issues and received the same results. I’ve logged the issues in our tracking system with ID SLIDESNET-42559 and SLIDESNET-42560. Our development team will investigate these cases. I will inform you about any progress.
Our development team has been working on the issues you described. As a workaround to avoid the CellUnsupportedDataException error, please try to set your calculated data for charts as an external workbook receiving from Aspose.Cells:
Hello, were using slide in a service setting, using the file system, is not an option for us.
Does this also work with ChartData.WriteWorkbookStream, now?
We had the issue that, Chart is triggering the recalculation even, when the Workbook was overriden.
In a newer feature we also had the issue that recalculation error is also triggered even after removing every formular, but for this we have no good sample now
The workbook can be processed with Aspose.Cells and uploaded back to the Aspose.Slides. Our development team prepared an example based on your code examples: SampleIFix.zip (43.6 KB). Please try it on your side.
The issues you have found earlier (filed as SLIDESNET-42560) have been fixed in Aspose.Slides for .NET 22.3 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.