Insert lines/columns & update formula

Hi

i have this structure of my excel file :

A1 contains the value X which is a variable in my code

and in B1 contains the formula SUM(A1:A1)

In my code, i insert 5 news columns after A1 so i will get A1=2,... E1=4; the formula will be the in the cell F1.

But F1 dont make the SUM of all inserted columns and show only the value of A1.

----------------------------------------------

I have tried then to give the formula in C1 and the new formula is SUM(A1:B1)

After executing the code, C1 will be in G1 and contains the SUM of all inserted columns

----------------------------------------------

Is there a solution for my first test because i dont like to let a whole cell between the values and the result of the formula.

Thanks

Hi,

Please try the fix @: Aspose.Cells Downloads and tell us if it is fine now.

Thank you.

Thanks.

The problem was not resolved.

Hi,

Well, I have checked your scenario. When B1 cell contains the formula SUM(A1:A1), and if you insert some columns after the first column, the formula will remain as its (SUM(A1:A1)) . For confirmation, you may verify it and try it in MS Excel, the results would be the same.

Thank you.