Error: Input string was not in a correct format

excel
activities
error

#1

I am working on this new project to do some arithmetic operations on the data provided in an excel file. I completed the arithmetic part, but when I run it an error pops us saying "Input string was not in a correct format". My data is of many numerical values, I have to do some addition, multiplications, percentages etc.

With some googling I did found using "regex" is an option to solve this. But unfortunately I am not used to that. Could anyone please help me with this error, as I am not sure where to put the regex and How!!!

thanx in advance :slight_smile:


#2

can you give the sample string ?


#3

this is the string I used within ASSIGN: (Integer.Parse(row.Item(5).ToString) + Integer.Parse(row.Item(6).ToString))

I am getting error here. Assign is used to store the numerical values.

I am hereby attaching my sample excel file.


#4

this is my workflow.
Note: excel has 3 sheets


#5

shall I give a suggestion,
write formulas to the cells, it will automatically calculate the values excel it self. because you are working with many variables.
i’ll check the workflow, and if i found error i’ll let you know,
excel formulas is an alternative way to perform these kind of actions


#6

tried doing so initially, but due to some requirement I followed so, thanx @ddrdushy1. Once you are free please go through the workflow, meanwhile I will look for the solutions too.