Cannot get write range 365 to work

I am currently trying to use a write range from office 365 i have it defined as follows

but when running the sequence I get that an unspecified error has occured. when I check the console for the exception details i have:

RemoteException wrapping UiPath.MicrosoftOffice365.Office365Exception: An unspecified error has occurred. —> RemoteException wrapping UiPath.MicrosoftOffice365.Office365InternalException: Code: ResourceNotFound
Message: Invalid version: error
Inner error:
AdditionalData:
date: 2025-08-20T21:21:36
request-id: a7c8c095-f3c1-43b5-8865-fddbfd3a3f39
client-request-id: a7c8c095-f3c1-43b5-8865-fddbfd3a3f39
ClientRequestId: a7c8c095-f3c1-43b5-8865-fddbfd3a3f39
—> RemoteException wrapping Microsoft.Graph.ServiceException: Code: ResourceNotFound
Message: Invalid version: error
Inner error:
AdditionalData:
date: 2025-08-20T21:21:36
request-id: a7c8c095-f3c1-43b5-8865-fddbfd3a3f39
client-request-id: a7c8c095-f3c1-43b5-8865-fddbfd3a3f39
ClientRequestId: a7c8c095-f3c1-43b5-8865-fddbfd3a3f39

at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request,
HttpCompletionOption completionOption,
CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject,
CancellationToken cancellationToken,
HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject,
CancellationToken cancellationToken,
HttpCompletionOption completionOption)
at UiPath.MicrosoftOffice365.Excel.Extensions.ExcelExtensions.WriteRangeAsync(GraphServiceClient graphClient,
DriveItem workbook,
String sheetName,
String startingCell,
DataTable dataTable,
Boolean includeHeaders,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Excel.Utilities.BaseRangeHandle.WriteDataAsync(DataTable dt,
String startingCell,
Boolean includeHeaders,
CancellationToken ct)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.WriteRangeAsync(WriteRangeBaseRequest request,
Boolean includeHeaders,
Int32 rowOffset,
Int32 columnOffset,
CancellationToken ct)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.WriteRangeAsync(WriteRangeRequest request,
CancellationToken ct)
at UiPath.MicrosoftOffice365.Activities.Excel.WriteRangeConnections.<>c__DisplayClass54_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.Productivity.Retry.Retry.ExecuteWithTimeout(Func1 action, Func2 exceptionFilter,
TimeSpan retryTimeout,
CancellationToken cancellationToken)
at UiPath.Productivity.Retry.Retry.ExecuteWithTimeout(Func1 action, Func2 exceptionFilter,
TimeSpan retryTimeout,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.Excel.WriteRangeConnections.SafeExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
— End of inner exception stack trace —
at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request,
HttpCompletionOption completionOption,
CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject,
CancellationToken cancellationToken,
HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject,
CancellationToken cancellationToken,
HttpCompletionOption completionOption)
at UiPath.MicrosoftOffice365.Excel.Extensions.ExcelExtensions.WriteRangeAsync(GraphServiceClient graphClient,
DriveItem workbook,
String sheetName,
String startingCell,
DataTable dataTable,
Boolean includeHeaders,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Excel.Utilities.BaseRangeHandle.WriteDataAsync(DataTable dt,
String startingCell,
Boolean includeHeaders,
CancellationToken ct)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.WriteRangeAsync(WriteRangeBaseRequest request,
Boolean includeHeaders,
Int32 rowOffset,
Int32 columnOffset,
CancellationToken ct)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.WriteRangeAsync(WriteRangeRequest request,
CancellationToken ct)
at UiPath.MicrosoftOffice365.Activities.Excel.WriteRangeConnections.<>c__DisplayClass54_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.Productivity.Retry.Retry.ExecuteWithTimeout(Func1 action, Func2 exceptionFilter,
TimeSpan retryTimeout,
CancellationToken cancellationToken)
at UiPath.Productivity.Retry.Retry.ExecuteWithTimeout(Func1 action, Func2 exceptionFilter,
TimeSpan retryTimeout,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.Excel.WriteRangeConnections.SafeExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
— End of inner exception stack trace —
at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.MicrosoftOffice365.Activities.Office365BaseClientActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

Any help would be apreciated in sorting this issue out

note: I have already tried to write the dataTable locally and it is writing it successfully

@goncalo.rocha

itemnotfound generally comes when sheetname is wrong

can you please recheck the same

better to select the range once the workbook is selected..it would show a dropdown and select from there

cheers

Hello, hope you are well, since I am using a workbook variable the sheets do not appear for me in the drop down selection, I have tried using a “Copy/Paste Range” activity in the same workflow with this kind of range and that activity is working fine

@goncalo.rocha

for setting up you can select a file and then once range is selected change it to variable

the notations are different

cheers