Write cell in last row

Hi there,

This is my goal:
I’ve a list of invoice number in a sheet call “Input”. I’d build the robot to pick invoice number one by one and search in a web and then scrape some data there. After that, the scraped data should paste in “Output” sheet in column B. In column A - should specify the respective invoice number (which was looped).

Issue:
The invoice number is not pasting at the last row. It is always starting from row 2 onwards.

Hi
can you share your workflow please or paste the full image of your workflow.

If you are using build datatable activity delete the prefilled rows initially you will be having 2 rows in build datatable delete one and then try?

Hi Lokesh, Thanks. Attaching my workflow for your reference. However, you’re unable to access my company webpage as it is limited.

Please advise me some idea.

AR_Reweight Report.zip (709.4 KB)

Inside for each row, Range for “Write scraped data” is specified as B2. Make it dynamic

That is for data scrapping. That is working fine for me. Just the last “for each” activity is not working fine with me.

How do I find the last row in excel?
eg. ctrl + down

Hi
can you show the sample coming as output from data scraping?

So from what I understand. If you are Writing 1 row at a time you should start index from 2 like “B”+index.tostring.
And in order to write on last row. you index should be equal to datatable.rows.count + 1 then write the row.

Example:
Index = dt.rows.count + 1

Write Cell – “B”+index.tostring

4 Likes

Yup I got it dear. Thanks

Welcome :slight_smile: