Corrupted file by using SetSharedFormula

Hi guys,
I have a problem when using the function “SetSharedFormula”. If I want to calculate formulas in a Table with “@” the result file is broken. I use the current version of Aspose.Cells 20.4 and Excel can calculate these formulas without any problems.
Here is my example application. The directory “Debug” contains the broken result file “Result.xlsx” and the original file “Original.xlsx” created by Excel

AsposeTestApp.zip (5.5 MB)
worksInExcel.png (4.7 KB)

Thanks for your support.

@akquinet,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-47312 – Output Excel file corrupted by using SetSharedFormula()

Thank you for your support.

@akquinet,
Please set ListColumn.Formula, do not set shared formula of the cell.

See following codes:

//Calc formulas for row Column3
sheet.ListObjects[0].ListColumns[2].Formula = "=[@[Column1]]+[@[Column2]]";
//sheet.Cells["E3"].SetSharedFormula(, 4, 1);

Let us know your feedback.

Thank you so much :slight_smile:
It works perfectly.

@akquinet,

Good to know that the suggested code segment figures out your issue. 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.