I am fairly new and getting stuck on a adding new rows to a sheet that already has rows. My flow “gets outlook mail messages” from 3 different inboxes and adds them together to output to excel. I have yet to figure out how to get each bot run to append, read range, write range the new emails to the emails already in the spreadsheet.
For example if the spreadsheet already has 50 rows and I run the bot and the 3 inboxes have 50 new emails coming in, the spreadsheet should now have 100 rows, but it still has 50 because I am overwriting them.
It doesn’t make any sense that Append Range would overwrite your existing data.
I noticed you’re doing a Read Range at the beginning. Are you under the impression that you should be reading the existing data from the Excel then add to it, then write back to Excel? Because that’s incorrect.
In fact, what I see now is that you have a Build Data Table after the Read Range. If both are using the same datatable, the Build is wiping out what you get from the Read Range.
But anyway, you don’t have to do any of that. All you have to do is read the emails, put them into a datatable, then Append Range to the file. You don’t have to include the existing Excel data in the datatable to append.
@postwick The reason my flow looks like that is because from another flow I did from the screenshot it works perfectly. So something must be breaking it.
Your Read Range is overwriting your datatable. You don’t need to Read Range before Append Range. You don’t load the existing data and combine it. Append Range just figures out where the last row of data is and APPENDS your new data after that in Excel.