Write Range: Could not write datatable to Excel

Hi All,

I need some help to identify what is going on with the my code.

I am having issues while writing datatable in excel tab. I have 3 write range activity in Excel Application scope. Error occurred on 3rd Write range activity. However, if I move last write range out of Excel application scope and create a new Write range Excel activity. It’s working fine.

Problem is my entire flow was working in when I last ran. Since today morning I am facing this issue.

I am writing the datatable in a worksheet which already has header on row 2 and I am writing datatable from A3. Below is the error message.

RemoteException wrapping UiPath.Excel.Excel Exception: Could not write the data table starting with cell A3. —> RemoteException wrapping System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC

I would appreciate any help. Thanks

@skg_161125

Have a look below thread.

Hi @lakshman

I could only think of adding some delay and validating the Excel Activity Package version.

I have added 5 sec delay between each write range activity with in one excel application scope.
And I am using Excel Activity package version 2.10.4.

I am still facing the same error at same activity. Every other write range activity before and after that activity is working absolutely fine.

Do you think of any other possible cause of this issue?

@skg_161125

It’s weird.

Can you try with Workbook activities and check it once.

Yes, If last write range activity is moved out from Excel application scope and add as Workbook Write range with same path, sheet name, range and datatable. It is working fine. But I am running a macro on the same excel after last write range, I am getting another error on Execute Macro.

But earlier, my workflow was working fine with all write range & Execute MAcro within same excel application scope.

@skg_161125

Did you update UiPath.Excel.Activities package ?

Can you please restart the system and then check it once.

I did not update my package. I tried restarting the system and UiPath. No Luck.

Tried multiple approach, but still facing the issue with only one Excel Application Scope activity.

I have tried re-installing excel package.

I am using couple of more Excel application scope after, those activity are working fine.
Can someone please help me? I am really stuck here.

Did you try killing all running Excel processes before executing the faulted excel scope activity?

Yes, already have Kill Excel process activity in place.

I also tried moving 2nd Excel Application scope activity before the activity I am currently having issue. I didn’t face any issue.

Try killing process just before the faulted activity. I had similar issue and support team told Target application not getting disposed properly was a cause for the issue.

Excel application scope → Kill → Excel application scope → kill → Excel application scope

Thank you for the suggestion. I tried this workaround, but still facing the issue.

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