This issue happens not because of inserting the rows. if the sheet has the range that refers to a single cell [For eg:SUM(B2:B2)] then formulas cannot be updated. This is the default behavior of MS Excel. This can be solved by changing range reference in your template file as follows:
The below link has the sample with the changed template file:
This page will automatically be redirected to the sign-in page in 10 seconds.