Why formulas are not updated when inserting rows in WinForms Excel?
This issue happens not because of inserting the rows. If the sheet has a range that refers to a single cell [For example: SUM(B2:B2)], then formulas cannot be updated. This is the default behavior of MS Excel. This can be solved by changing the range reference in your template file as follows:
- Insert a new row.
- Then change the formula. Say, "SUM(B2:B3)" instead of using "SUM(B2:B2)"
- Also, you can delete the unwanted rows after updating the formulas.
The below link has the sample with the changed template file:
Take a moment to peruse the documentation where you can find basic Excel document processing options along with the features like import and export data, chart, formulas, conditional formatting, data validation, tables, pivot tables and protect the Excel documents, and most importantly, the PDF, CSV and Image conversions with code examples.
Conclusion
I hope you enjoyed learning about why formulas are not updated when inserting rows in WinForms Excel.
You can refer to our XIsIO’s feature tour page to learn about its other groundbreaking features. Explore our UG documentation and online demos to understand how to manipulate data in Excel documents.
If you are an existing user, you can access our latest components from the License and Downloads page. For new users, you can try our 30-day free trial to check out XlsIO and other Syncfusion® components.
If you have any queries or require clarification, please let us know in the comments below or contact us through our support forums, Support Tickets, or feedback portal. We are always happy to assist you!