Write cell in last row

excel
activities

#1

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.


#2

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?


#3

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)


#4

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


#5

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


#6

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


#7

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


#8

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


#9

Yup I got it dear. Thanks


#10

Welcome :slight_smile: