Runtime Error - Exception from HRESULT: 0x800AC472

Hi all,

I’m new to using the Studiox application and running into a runtime error with the ‘Delete Row’ command. The error is copied below and further details at the end.

Message: Exception from HRESULT: 0x800AC472

The entire workflow has ran a few times prior to this, but has continuously returned an error ever since. The rest of the activities will operate just fine if I disable the ‘Delete Row’ activity.

I realize it’s probably a simple oversight on my end, but I couldn’t seem to find a solution that worked; attempted a delay and saw a kill command, but it didn’t seem available in StudioX?

Any help from the community would be greatly appreciated. We’re trying to use this run as POC for our team’s automation efforts. I’m using Office 365 in case it’s a helpful detail. Thanks!

RemoteException wrapping UiPath.Excel.ExcelException: Exception from HRESULT: 0x800AC472 —> RemoteException wrapping System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472
at Microsoft.Office.Interop.Excel._Application.Union(Range Arg1, Range Arg2, Object Arg3, Object Arg4, Object Arg5, Object Arg6, Object Arg7, Object Arg8, Object Arg9, Object Arg10, Object Arg11, Object Arg12, Object Arg13, Object Arg14, Object Arg15, Object Arg16, Object Arg17, Object Arg18, Object Arg19, Object Arg20, Object Arg21, Object Arg22, Object Arg23, Object Arg24, Object Arg25, Object Arg26, Object Arg27, Object Arg28, Object Arg29, Object Arg30)
at UiPath.Excel.RowOperations.ExtendRangeAndRelease(Range& baseRange, Range& extensionRange)
at UiPath.Excel.RowOperations.FindRowsToDeleteOnCriteria(Range rows, Func2 matchesCriteria, Boolean isFullSheet) at UiPath.Excel.RowOperations.<>c__DisplayClass2_0.<DeleteRows>b__0(Range rows) at UiPath.Excel.RowOperations.<>c__DisplayClass6_2.<InnerDeleteRows>b__2() at UiPath.Excel.ExcelContextHelper.Execute[T](Func1 func, ExcelContext context, Object contextParams)
— End of inner exception stack trace —
at UiPath.Excel.ExcelContextHelper.Execute[T](Func1 func, ExcelContext context, Object[] contextParams) at UiPath.Excel.RowOperations.InnerDeleteRows(String range, Func2 findRowsToDelete)
at UiPath.Excel.RowOperations.DeleteRows(String range, String sheet, DeleteRowsOption deleteOption, Boolean isFullSheet, IEnumerable`1 indexesToDelete, Boolean deleteFirstRow)
at UiPath.Excel.Activities.Business.DeleteRowsX.<>c__DisplayClass16_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Excel.Activities.Business.DeleteRowsX.d__16.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @rubblesrc

Check this

Excel in SharePoint Throws Exception HRESULT:0x800AC472


Hi Ashwin,

Thank you for directing me to the thread. I read that one as well during my search, but couldn’t seem to locate the ‘Read Range’ activity that is offered as the solution. I’m wondering if it’s an activity available in Studio, but not Studiox?

Attempting the activity search in the workflow doesn’t return a match, the layout also seems to differ from the thread example.

I made sure to read the ‘Read Range’ document page as well, but couldn’t discern what I was missing or possibly overlooking -

I think at this point, I 'll request the 60 day trial to access Studio and see if I can implement the suggestions from there.

Thank you again for your help, much appreciated!

In case other new users are stumbling across this, I believe your trial defaults you to the community version, Studiox, but a trial access to Studio comes with the registration. It just needs to be enabled through the UiPath application >>Settings>>License and Profile>>View or Change Profile

Is excel having a popup window opened while running the flow? Maybe an unlicensed excel warning?
Does a delay before the delete rows solves your problem?

This error usually error when there is problem with your excel license.
Quick solution for this is to kill the excel before manipulating it. Kill the excel from the task manager then run your process.

Hope it will work

Hi HoriaBelu,

There isn’t a popup window that I am seeing. I checked my Microsoft 365 subscription as well and there doesn’t appear to be any warnings or issues of an invalid license - it’s an enterprise version, Office 365 E5. I attempted delays previously, but continued to receive the same error at the ‘Delete Row’ activity.

The strange thing to me, is that all the other Excel related activities after the ‘Delete Row’ activity works perfectly. The issue appears directly related to the delete row activity. I would assume an Excel license or compatibility issue would cause an error for every subsequent activity that accesses the workbook. When I first built out the workflow as well, the ‘Delete Row’ activity performed the function with no issues, but once the error was encountered, it almost feels like the error became stuck.

I created a whole new project with a new worksheet to test the ‘Delete Row’ activity, and it worked. So, I’m assuming there’s an issue with the existing file at that particular action.

Thank you for taking a look! I’ll keep testing to see if another approach can work.

Thank you for the suggestion, ghazanfar. The task manager method didn’t work - but I think it’s more a file related issue that has persisted since the error was encountered. I’ll pull a new file and see if that alleviates the issue. It’s a relatively large file and my first time running the automations, so I’m sure a few wires may be getting crossed when building it out.

Can you post a pic of the workflow? What is the last action that modifies the excel file? Do you have sensitive info in the workbook, can you attach it and the flow?

Hi HoriaBelu,

A copy of the workflow was exported to Excel and attached. Please let me know if that’s helpful. The last action that modifies the Excel file is a macro recorded activity which clicks the “Refresh All” button under the Data tab to update several pivot tables.

The workbook does house sensitive information, so I unfortunately won’t be able to share it. But please let me know if you may need anything else. Thanks!

Main.xlsx (10.8 KB)

which studiox version do you use?
please attach the main.xaml from the project folder

Hi Horia,

It’s version 2020.10.0. A copy of the main.xaml file is attached. I removed the macro recorder at the end as it looked to capture a screenshot of the data involved.


Main.xaml (18.7 KB)

which excel package do you have? this is how delete row looks:

try to update excel package to 2.9.2 preview

The Excel package is currently set to v2.9.3. The ‘Delete Row’ does look the same.


I’ve tried several different variations with the setup. Referencing tables and sheets in the range field, as well as the ‘What to delete’ field to specific rows. It also doesn’t appear to be location or sequence related, since I tried moving the order it would run, but still continue to receive the error.

Thanks again for taking the time to try and resolve the issue!

indeed, my fault, it’s the same activity.
maybe the table you whish to delete is filtered?
can you just delete the sensitive data and attach the xlsx file? the structure might be the problem

Hi HoriaBelu, the table I’m deleting the rows in do have the header filters enabled, but no rows in particular are being filtered. I removed the header filters, but received the same result. I unfortunately won’t be able to provide the file since most of it is sensitive, but I’ll try to re-install the program (it could be something corrupted).

The strange thing is that the ‘Delete Row’ activity did work previously on the exact same file, so I’m doubtful it’s a structural thing. It wasn’t until I encountered the error that it became perpetual.

i suspect that on the first successful run you altered the excel file somehow and since then you get the error on each run.
if you just do a new project and on a new excel file with a basic table you try to delete errors it works? i doubt there is a need to reinstall studiox

That’s what I had assumed as well and tried replacing the original file, but it didn’t ameliorate the issue.

I just created a new project and new excel file (completely unrelated to the prior report), but it still runs into the error; the only action included is the ‘Delete Row’ activity. I’ll reinstall the program and try to eliminate any other possible combinations. If I find a solution, I’ll report back.

Thanks again for all your help!

Any other excel activity is working fine?
Try to update studiox to latest version which just got released.

Ways to Fix a Runtime Error
Restart the computer.
Update the program to its latest version.
Fully delete the program, and then reinstall it.
Install the latest Microsoft Visual C++ Redistributable package.
Use SFC scannow to repair corrupted Windows files.
Run System Restore to return your computer to a previous state.

This may help you,
Rachel Gomez