I have been stuck on this for an embarrassing amount of time. I am getting categories from outlook messages and building a data table to output to an excel sheet. Basically the every time I run the bot it should output a row like…
Date | Category Count
2/28/2024 | 8
And every time I use a write range or append activity in an application scope the data gets replaced. For example if I ran the bot again instead of showing
Date | Category Count
2/28/2024 | 8
2/28/2024 | 13
Could you check if you are adding the data to the same datatable you are reading it and writing the datatable with all the new data?
also look possible duplicated variables
If Above not working for you use this one.
–>Prepare DataTable to write to excel with your categories from outlook messages data.
–>Before writing new data to existing excel file data, read it to DataTable with Read Range activity.
—>Use If Condition activity and check if DataTable have any Rows by this dt.Rows.Count > 0
In If block use Activities - Merge Data Table (uipath.com) and merge to be written Datatable into existing data Datatable. Use Write Range to write the output datatable to excel.
In Else block Use Write Range to write the DataTable to write to excel with your categories from outlook messages to excel.
This is what I am using. Basically sheet two outputs a row and I want to move that row to sheet 3 that has all the rows from every bot run. But the problem, lets say I write range gets 10 emails, those 10 emails should be aggregrated into one row, but in the append range it adds a row for each email so I end up with 10 new rows.
Append Range: Exception from HRESULT: 0x800A03EC - I am getting this error now for the append range. I have troubleshooted everything, but still getting the error.
The write range is to output the newest data from the email categories, then read that data and move it to the other sheet, if that makes sense. When I take out write range it still has the void closedxml error.