When i save my worksheet with option:
C#ws.Options.Export.CustomFunctionExportMode = CustomFunctionExportMode.CalculatedValue ws.SaveDocument(outputFile, DocumentFormat.Xlsx);
CalcChain in outfile is not updated. All formulas are replaced by values but this cells are still in CalcChain.
For MS Excel this is not problem, but if i load this file with code, i get a nullpointer exception in DevExpress-class:
C#public class CalculationChainElement
...
private bool CellsChainContainsCell(CellsChain chain, ICell cell) =>
((cell.FormulaInfo.NextCell != null) || object.ReferenceEquals(chain.Footer, cell))
because cell.FormulaInfo is null. Remember, cell-formula was replace by value in step 1.
Is it possible to fix that?
- Update CalcChain while saving worksheet with CustomFunctionExportMode.CalculatedValue.
- Be more fault-tolerant while loading document.
Thank you for your help,
Sascha
Hello Sascha,
I've passed this ticket to my team. Our developers will research this issue in detail. We will get back to you once we have any results.
P.S. Would you mind if I mark this ticket public in order to notify other customers of the issue? If you wish, I can remove your project from the attachment.