Append logic does not follow through - Write data table error / bug

The definition is as follows

  • Append - If selected, the data is added starting with the first blank row in the destination range. If not selected, the data is added starting with the first row in the destination range, replacing any existing data. This option is not selected by default.

This definition does not imply that having no data beneath the headers to begin with, will make the bot not add data. Its as if it needs to find filled in rows, before finding the first empty row. (Which means it is not truly finding the first empty row at all, but doing something slightly different to begin with).

What if the “Create if not exists” activity occurs? What than? It just creates a file that, because of this weird append logic, can’t add any data to the file it creates. No data under the headers should count as the first empty row (Row 2, assuming the headers are in Row 1).

Update: Append feature is straight up denying to function. After 3 hrs of trying, I have not been able to get it to work.

The “Append” activity works when the target file is empty, it doesn’t require the file to have already some rows. Can you provide an example where it didn’t work as expected?

Here is the workflow and spreadsheet example.
The initial data only goes up to the short description. The other columns are for a secondary scraping that occur by exploring each Title Url.


You are correct, it doesn’t count as empty, as the headers are prefilled in. But still. the activity should technically still work.

I still believe that this works as expected: I just retested it and for me it’s all good.
Can you send me the .xaml file and the empty Excel sheet? I can check whether I can spot anything weird.

Ok. update. The Append option is absolutely refusing to work in any capacity. It straight up does not add table data under the existing data - it opens up the spreadsheet, and than does nothing for 5 seconds - and than claims to have run successfully. :tired_face:

um. here are the files you requested. thank you for helping
Main.xaml (16.9 KB)
NewsItems.xlsx (106.6 KB)

And the following is a version with the data (it is public data, don’t worry)
NewsItems2.xlsx (1.0 MB)

Have a good day

I think this is the solution to my problem. but it still doesn’t explain why it isn’t working.

Can you please give a try to this?
image
I could reproduce your behavior and make it work if I specify a range, but I’m having other issues (not related to UiPath and your file :sweat_smile:) so it’s hard to say whether it’s really 100% working. It’s a quick test though, so you can give it a try. :slight_smile:

It works for 1st time data. As it ignores the append part, and just over-writes the 1st few rows.

I have a “Find first empty row” activity, which saves the value to a variable named LastRow

I have used …
Excel.Sheet(“Sheet1”).Range(“A”+LastRow.ToString)
And it isn’t complaining just yet.

1 Like

It worked!!! Thank you @Irene
I have been working on this project for a month, and almost gave up.
:pray: :raised_hands:

1 Like

Good news then!! Glad to hear, keep up the good work! :slight_smile:

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