How to write cell in the next row?

I just want to Get Text(daily stock price) from a web page to an Excel file,
I use Write Cell,but I can only write in a specified range like B2, Is there any way to write it into
next row,I want it keep renewing my excel file without changing the Write Cell range everyday.

Sorry for my poor English expression.

1 Like

@111128 Welcome to uipath community

Yes you can do by using one counter variable

1 Like

Hi,

Welcome to the community!

To answer your question, we need to get clarification on few things,

  1. Is your process scheduled? if so, one way you can implement this is by reading the excel file before you writing it and appending your new values to the datatable and write it back to the excel sheet.

  2. If the bot is completely dedicated only to this process. you can keep the counter as indra said. But usually this wont be the scenario.

Try and let us know if you need any further help on this.

Best,
Sid

1 Like

@111128 : Take a counter variable and intialize 1 at starting ,after writing the value every time increment the counter.so your value will not get override.

Hope this helps.

Thanks

Thank you for your answering, but I still don’t know how to take a counter variable, use Assign?

can someone show me the screenshot or something that I can learn it clearly,please.

But still thanks, I’m just a student , so forgive me that I’m too stupid to learn…%E6%93%B7%E5%8F%96

You have to use the counter variable at cell position ( where you coded as b2). You have to increment the cell value as b2, b3, b4,… so on. In such case, we need to do the below steps.

  1. we need to declare a counter variable. it is nothing but a variable with datatype int32. let it be, counter.
  2. initialize it to a integer value. You can use assign activity for this. Counter = 1
  3. now you can mention the cell position as “b”+counter.Tostring
  4. increment the counter by 1.
1 Like