How do I write two or more variables into one excel cell

I start off with for each excel row activity and then I do something for each UI element I then download one or more files. Each file has a specific text assigned to it on a website and I store it as a variable. And then I use this variable and I write it to one column from my current row.

If there is 1 file then there is no problem, but when there are 2 or 3 or 4 files it does not add it to what is currently in the cell.

How can I manage it?

image

Content of my var is different with For Each UI Element.

Help please.

@JennZabba

Before write cell you can use read cell and then append the data to the output of read cell and use it in the subsequent write cell activity

str is the output of read cell and var is the value you want to append

then str + "," + var will be used in write cell activity

Hi @JennZabba

cellValue = existingValue + " " + variableValue

Hope it helps!!

Hello Anil,

Thank you for your reply.

Could you please be more precise as I’m not yet as experienced as you?:slight_smile:

And where do I type it?

@JennZabba

  1. Use a read cell activity on the cell where you would write the data and store the output in varaible str
  2. Use write cell activity on same cell where you want to write the data and give the value as str + "," + var - here str is from previous step and var is the variable holding the data which you want to append to the data present in the cell

Hope this is clear

cheers

Thank you it is clear now.

1 Like


Why that might be?
image

@JennZabba

I guess str is created as object type…please change the datatype to string in variables panel

or use str.ToString

cheers