SharePoint Excel Services SetRangeFailure – The requested operation attempted to overwrite the contents of cells that cannot be edited.

In this post, you’ll learn about the error message “SetRangeFailure – The requested operation attempted to overwrite the contents of cells that cannot be edited.” that you usually receive when working eith the Excel Services in SharePoint.

When working with SharePoint Excel Services, there are error codes that are generated in the SOAP exception when the errors occur in the Excel Services. You can use the SubCode property that is available in the SoapException class to identity these error codes and troubleshoot the issue.

Error Message

SetRangeFailure – The requested operation attempted to overwrite the contents of cells that cannot be edited.

Reason for the Error

The caller tried to write values into a range that has protected cells. For example, the cell contains a formula.

Solution

Only empty cells or cells that contain values can be edited by Excel Services.