I tried to read one excel using the “Read Range” activity and want to insert the data table returned from that activity to another excel using “Append Range”. But it gives me ExcelException mentioned in the title. Below are the logs for the same, can someone suggest a solution on this?
RemoteException wrapping UiPath.Excel.ExcelException: Could not write the data table DataTable starting with cell A1. —> RemoteException wrapping System.Runtime.InteropServices.COMException: The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Dynamic.ComRuntimeHelpers.CheckThrowException(Int32 hresult, ExcepInfo& excepInfo, UInt32 argErr, String message)
at CallSite.Target(Closure , CallSite , ComObject , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at UiPath.Excel.WorkbookApplication.WriteDataTable(Range startRange, Int32 startRow, DataTable newTable, Boolean includeHeaders)
at UiPath.Excel.WorkbookApplication.WriteRange(String startCell, DataTable data, Boolean includeHeaders)
— End of inner exception stack trace —
at UiPath.Excel.Activities.ExcelInteropActivity`1.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)
I have faced the same issue however using the try catch activity for write range it will write the data-table in excel work book.
Assumption: Due to faster execution of this activity(Write Range) excel work book is closing automatically without timeout that leads to throw an error.
Note: Use Try Catch inside write range activity, in catch use Uipath.Excel.ExcelException
I faced the same issue in my case data is written in the excel file and still getting the error, i tried try catch to make my code work. Any quick fix will be appreciated.
Hi, Any solution to this. i also encounter this. when writing to *.xlb.
Error: write range: could not writ eht data table DataTable starting with cell A1
Add some delay (10 seconds or more or less ) between Read Range and Append Range activity. I got the same error and after adding the delay of 10 seconds, it worked for me. You can change the delay accordingly.
Please check the data in your excel. In my case the error is caused by ‘=’ or ‘==’ symbol in one of the row. I noticed this by running it multiple time and saw the robot always stuck at the same row. In my case i can filter the data as it is not required and proceed with write range/append range activity.
Hey, Im not sure if you have already fixed your issue, But I was having the same error as you and I realised it was because there was a cell in the dateable that somehow started with a “=” even thought it wasn’t a formula. You could check if that is the case for you.
I fixed this by using a for each row, assign the cell value to " ’ " + Original Cell Value,
The " ’ " is used in excel to combat excel formatting and is not visible in the output.
Hope this helps you and others having the same issue.
In my case it was ‘bad’ data in the table that it didn’t like. A date in the system had been incorrectly input as 10/31/0219 (vs. 2019), which would be a negative number in Excel (relative to epoch 1/1/2019) - removing this value fixed the problem.
Great timing to see your reply here Michael, you saved me some pain on my own project.
Dates being extracted from a legacy system were mishandled. so some null values became 1-1-1801 in the SQL view data, causing this error with write range for excel.