Write Cell ACtivity error

Hi Friends,

I am getting the below error while data is loading into excel cell . The robot is looping into for each row and writing it into the specific cell range.

Error :
Write Cell: Failed setting the current sheet to: Sheet3 in workbook: C:\Users\user\Pictures\OUTPUT_New.xlsx. Original error message: Exception from HRESULT: 0x800401A8

I’m getting this error multiple time for 3 different columns.

I have seen some of the posts regarding this error and few friends suggested me to put delay of 3 seconds before and after excel application scope

even though I put 3 seconds delay still it is stuck at some value and unable to fill the rest of the values. as it is filling 10 values out of 300 and while at the time of filling 11th value, it is throwing me the above error.

May I know how to resolve this? @aanandsanraj @balupad14 @Palaniyappan @Lahiru.Fernando @nisargkadam23

Thanks in advance!

Hi friends,

I’m getting the below error while filling the data from datatable into specific cell using Excel application scope : Write cell activity.

Write Cell: Failed setting the current sheet to: Sheet3 in workbook: C:\Users\user\Pictures\OUTPUT_New.xlsx. Original error message: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))

sometimes it is giving the above error randomly at mid point after filling 5 values out of 400.
sometimes it is giving the above error after it fills 200 values.

Please suggest me on how to resolve such error.

Thanks in advance

Same problem here.
Using ‘Excel Application Scope’ (Visible option turned off) with Write Cell.

It’s so unstable and it’s critical.

Repair the Office Application from the Control Panel and check, your issue will get resolved. Please note that if you are using the enterprise version the license should be active. Please mark this as solution the if the issue get resolved…

Thanks
Mahesh

Hi @eshwarsai_ks

Please always include the Excel activity package version in your bug reports.

For now, my suggestion would be to have a look at other topics that were solved with the same error code:
https://forum.uipath.com/search?q=%220x80010108%22%20status:solved

1 Like

Hey @loginerror -

The link you posted for searching the UiPath forums includes the wrong HResult Error code as the 1st HResult error in their post is: HRESULT: “0x800401A8” & should be this search link/term.
Unfortunately however, the search results only contain 1 thread & it’s not technically a solution, rather a recommendation on how to avoid it, but doesn’t actually give any of the following info: how to investigate & explore the exception further, how to replicate it, what the root cause is, & similar; rather it simply says to add a couple second “Delay” between the activities where it occurred.

Speaking of HRESULT: “0x800401A8” Error - For the first time today, a process I developed that has been running in Production without a single issue since Oct. 7th, 2020 encountered this same exception during its scheduled run this morning during a “Write Cell” activity that writes into a few Excel Cells to update the Formulas in them to include the appended rows added earlier in the run (e.g. If Excel has 5 rows before appending 10 rows, formula in Col. A would change from =COUNTA(A1:A5) to =COUNTA(A1:A15)). What else is strange is that during the run, none of the prior Excel Activities in Scopes on the same file had any issues & executed correctly (e.g. all Write Cell, Write Range, Read Cell, & Read Range activities).

The Excel App Scopes are also set up using an “UiPath.Excel.WorkbookApplication” datatype variable for the file that is passed between the XAML Files (“Modules”) within Process.xaml, & both “Save Workbook” + “Close Workbook” activities are used to handle saving/closing accordingly in place of the “Save Changes” property on every activity.

Give the above info & fact that it was working every day for months until today’s error on this 1 activity… Is there any additional insight or troubleshooting I can do to actually identify & resolve the issue for certain, besides adding a minor delay, @loginerror?

The Project was using UiPath.Excel.Activities v2.7.2, but I’ve since upgraded it to v2.9.5 to see if that helps any, will know tomorrow if the error occurs again. For the UiPath Project/Process + NuGet Package & version of, not a single change as been made to them, including the code, Excel Template & Files used, Application/Websites used, or anything really since deployment on October 2020; prior to today, had never once before seen this occur & cannot replicate it, even after re-running today’s run numerous times on the same Virtual Machine+Robot with same file, data, etc.


On the topic of the other HRESULT code in OP’s post: “HRESULT: 0x80010108” is correctly linked, but is NOT seemingly associated with HResult: “0x800401A8” as that occurred for me without the second one occurring.

Thank you @loginerror