How to write same string to multiple columns using minimum write activity

I need to know how to write same string (e.g- "no data " ) to multiple columns using minimum write activity. I am uploading e.g (n.b- this is not the actual scenario) excel
Here i need to write “no data” to multiple columns. In real scenario i need to write “no data” on specific cells, so looping wont work here.When i use write cell activity for each cells it goes upto 15 to 20 write cells.
Does ui path have any option to write the same value on multiple mentioned cells only ?

1 Like

Yah but without looping with for each row or for each or use that much n number of write cell activities
We won’t be able to update multiple columns

Even if we use vb script we would be using looping over there
And even if we use add data row activity with multiple column value passed in the ARRAYROW property it can enter only one row at a time and to mention in more number of rows then we need to loop again

Hope this would help you

1 Like

As per my understanding,

You can use auto fill range to fill the data of particular cell to the required range, so that you can simply loop to write in one row for all the columns and then you can use auto fill range to fill for required rows

One more thing is , as we have an option to pass params to macro, you can record one macro and pass the required range to fill the data.

Hi ,
Thanks for the reply.
i am able to write value by mentioning single dynamic cell value.
Actually i need to write upto a range by passing the variable like mentioned below. Could anyone help me on that.

I am able to write cell like this3
I need to make this dynamic. Here ,&counter+1 holds the value 2. Can anyone help me this to make dynamic.

The best way to update excel in to use Execute non query

"AC"+cstr(counter+1 )+":AL"+cstr(Counter+1)

Hi @amaresan,
It throws the error like no range exists

Can you Show me the full code what you are used in write cell

Thanks Bro!
It works !! :handshake::innocent:

1 Like

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