I’m trying to create a new column called “Estimated value” to a file with a data table. This column should contain a variable called “estimatedValue”. I’m using For Each rouw activity. This is my code:
And here is the content of the “Cell” field in the Write Cell workbook activity.
However, everytime I run the code, I get an error saying the cell doesn’t exist. How can I write the variable “estimatedValue” in the correspondet cell dinamically?
Your cell field should be valid cell address like A1,A2, etc. Since you are trying to write in column G you can use this expression “G” + cstr(index+2) (index is your iteration count of the for loop). Index is 0 based so you add 1 and we add another 1 since G1 is your column name.
Index should be an int32 variable. You have to declare that variable in the for each loop properties section, and then use that variable in the expression.