Assign: Input string was not in a correct format. Sum of 4 numbers and Write on a excel sheet

Everything seems correct like there is no comma in the excel column and the format, column name etc but still facing this error again and again.

Hope to find some help here.

Is the total column used as input?
If yes then 5th row is empty maybe that would be causing the error

Yes taking the first 4 values as Input and the Diff is the sum of the previous 4 row values. After your response used a different row like K2 to print the result but same error.

Use expression below

sum5 + Double.Parse(row(“Total”).ToString)

thanks for your concern, applied but the result is ultimately same. No change but the same error.

I just did the same thing… and it worked on my system…
I believe you’ve to check the variable/argument type… sum5 and value to which you’re assigning is of wrong type.

Or I could see you’re into a loop so… input must’ve some wrong value.

1 Like

the variable type of my sum5 is double.

It would very helpful for me if you share your xaml and excel files with me.

Hi @Tanzill_Ahsan

Can u try like this


1 Like (38.6 KB)

1 Like

I had rechecked your solution and set my read range only for the rows, e.g(A1:A5) that contains value and the error is not happening anymore.

Thanks for help.


Thank you

Thank you everyone. From this thread and the discussion I found a solution. I am using read range e.g (A1:A5) now where I am previously using the read range for the whole sheet which may causing this error.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.