Excel.AppendRange vs Workbook.AppendRange - Identifying the end of file



How do Excel.AppendRange and Workbook.AppendRange identify the end of last record to insert data.

I used the below excel file(template) and used both Excel Append Range and Workbook Append range to insert data into the excel(copy of the same file). The results are different.

I do not want to use writerange since I will not know where the table will start.

I am also attaching the project file with the template file here (22.3 KB) .



With Excel.AppendRange

With Workbook.AppendRange


I was about to modify your example - great by the way that you attached, this way is always easier- but I have a few questions:

  • What is the reason of you not knowing where the table starts?
  • Will you append more data afterwards?

the first questions comes in mind because you as RPA analyst need to provide the solution for the client by giving them an standard format. :slight_smile:

The second if its true will let you decide whether use append range or just use write range activity.

Then if you don’t know where the table will start and need to append more data, there are ways to achieve this, like read the table form, this by reading cells and find the first one and go from there(in this case I see that abc corporation will be the starting point)and then using a standard template move the information there and then you will be able to append the data normally.

and lastly the reason why it is inserting the data on those places is because it’s reading the ranges, formated as table, as if they have information.

please let me know, So I can start working on this.