You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Excel Services generates errors and error messages in the SOAP exception based on errors that occur in Excel Services. The following table shows the errors that are accessible when calls to the Excel Web Services methods throw a SOAP exception.
15
-
16
-
17
-
18
-
19
-
You use the [SubCode](http://msdn.microsoft.com/library/frlrfSystemWebServicesProtocolsSoapExceptionClassSubCodeTopic.aspx) property of the **SoapException** class to capture the error codes. For more information about using the **SubCode** property to capture error codes, see [How to: Use the SubCode Property to Capture Error Codes](how-to-use-the-subcode-property-to-capture-error-codes.md)
20
-
For more information about Excel Services alerts, see [Excel Services Alerts](excel-services-alerts.md).
21
-
22
-
23
-
24
15
16
+
You use the [SubCode](https://docs.microsoft.com/dotnet/api/system.web.services.protocols.soapexception.subcode?view=netframework-4.7.2) property of the **SoapException** class to capture the error codes. For more information about using the **SubCode** property to capture error codes, see [How to: Use the SubCode Property to Capture Error Codes](how-to-use-the-subcode-property-to-capture-error-codes.md)
17
+
For more information about Excel Services alerts, see [Excel Services Alerts](excel-services-alerts.md).
25
18
26
-
## Error Codes
19
+
## Error codes
27
20
28
21
The following table lists the error codes for Excel Web Services alerts and the associated messages, explanation, and resolutions.
|ApiInvalidArgument <br/> |Invalid value to argument: {0} <br/> |An invalid value for an argument was passed into the API call. <br/> 0 = name of the argument. Its value is invalid. <br/> |Use a valid value for the argument. <br/> |
@@ -52,38 +41,19 @@ The following table lists the error codes for Excel Web Services alerts and the
52
41
|NotMemberOfRole <br/> |Access denied. You do not have permission to perform this action or access this resource. <br/> |The caller does not have permission to access the server. <br/> |Contact your administrator. <br/> |
53
42
|ObjectTypeNotSupported <br/> |One or more object types provided are not supported by Excel Services. The operation was rolled back. <br/> |The caller tried to write unsupported object type values into a range. <br/> |Try the operation again using one of the supported object types. <br/> |
54
43
|OperationCanceled <br/> |The operation has been canceled. <br/> |The operation that is currently taking place is canceled because the user calls the **CancelRequest** method. <br/> |Call the **CancelRequest** method only if you want to cancel the current operation. <br/> |
55
-
|RangeParseError <br/> |Excel Services was unable to parse the range request. <br/> |The range that was passed into a method with the A1 suffix (**SetCellA1**, **SetRangeA1**, **GetCellA1**, and **GetRangeA1**) could not be parsed. <br/> |Enter a range reference using A1 notation such as "Sheet1!Range("A6:A15")" or a valid structured reference such as "[ShipCity].[#Headers]". <br/> |
44
+
|RangeParseError <br/> |Excel Services was unable to parse the range request. <br/> |The range that was passed into a method with the A1 suffix (**SetCellA1**, **SetRangeA1**, **GetCellA1**, and **GetRangeA1**) could not be parsed. <br/> |Enter a range reference using A1 notation such as "Sheet1!Range("A6:A15")" or a valid structured reference such as "[ShipCity].[#Headers]". <br/> |
56
45
|RangeRequestAreaExceeded <br/> |The area of the requested range exceeds 1,000,000 cells. <br/> |The requested range exceeds the 1,000,000 cell limit. <br/> |To return ranges that contain more than 1,000,000 cells, use multiple calls. <br/> |
57
46
|RetryError <br/> |Excel Services is unable to process the request. <br/> |Excel Services might at times reach a state where its resources are low. When this happens, it might start denying requests. <br/> |Wait a few minutes and try to perform this operation again. <br/> |
58
47
|SaveFailed <br/> |An error occurred while saving the file. <br/> |A call to the **GetWorkbook** method failed. <br/> |Try to save the file again. <br/> |
59
48
|SetRangeFailure <br/> |The requested operation attempted to overwrite the contents of cells that cannot be edited. <br/> |The caller tried to write values into a range that has protected cells. For example, the cell contains a formula. <br/> |Only empty cells or cells that contain values can be edited by Excel Services. <br/> |
60
49
|SheetRangeMismatch <br/> |The sheet provided as the sheet argument is not the same as the sheet specified in the range argument. <br/> |The name of the sheet passed in for a _sheetName_ parameter does not match the sheet ___location specified in the _rangeName_ parameter. <br/> |When specifying a sheet in both the range and sheet arguments, ensure that the sheet names are the same. For example, `Calculate(Sheet1, Sheet1!Range("A1"))`. <br/> |
61
-
|SpecifiedRangeNotFound <br/> |The requested range does not exist in the sheet. <br/> |The range that was passed into a method with the A1 suffix (**SetCellA1**, **SetRangeA1**, **GetCellA1**, and **GetRangeA1**) could not be found. <br/> |Make sure the range specified exists in the sheet. <br/> |
50
+
|SpecifiedRangeNotFound <br/> |The requested range does not exist in the sheet. <br/> |The range that was passed into a method with the A1 suffix (**SetCellA1**, **SetRangeA1**, **GetCellA1**, and **GetRangeA1**) could not be found. <br/> |Make sure the range specified exists in the sheet. <br/> |
62
51
|WorkbookNotSupported <br/> |The file you selected cannot be opened because it contains feature(s) that are not supported by Excel Services. One or more of the following unsupported features were detected in the workbook: <br/> {0} <br/> |The workbook contains unsupported features. <br/> 0 = a \\n separated list of unsupported feature names. <br/> |Make sure the workbook does not contain features that are not supported by Excel Services. <br/> |
63
52
64
53
65
54
## See also
66
-
67
-
68
-
#### Tasks
69
-
70
-
71
-
72
-
73
-
74
-
[How to: Use the SubCode Property to Capture Error Codes](how-to-use-the-subcode-property-to-capture-error-codes.md)
75
-
#### Concepts
76
-
77
-
78
-
79
-
80
-
81
-
[Excel Services Alerts](excel-services-alerts.md)
82
-
83
-
84
-
85
-
[Excel Services Known Issues and Tips](excel-services-known-issues-and-tips.md)
86
-
87
-
88
55
89
-
[Excel Services Best Practices](excel-services-best-practices.md)
56
+
-[How to: Use the SubCode Property to Capture Error Codes](how-to-use-the-subcode-property-to-capture-error-codes.md)
Excel Services generates errors in the SOAP exception based on errors that occur in Excel Services. To make it easier for the developer to catch specific error conditions, an Excel Calculation Services alert has an associated error code. The Excel Web Services then returns the error using properties from the **SoapException** class.
15
-
16
-
17
-
18
15
19
-
The following examples show how to capture the error codes using the [SubCode](http://msdn.microsoft.com/library/frlrfSystemWebServicesProtocolsSoapExceptionClassSubCodeTopic.aspx) property (http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapexception.subcode.aspx) of the **SoapException** class.
16
+
The following examples show how to capture the error codes by using the [SubCode](https://docs.microsoft.com/dotnet/api/system.web.services.protocols.soapexception.subcode?view=netframework-4.7.2) property of the **SoapException** class.
20
17
21
-
[!NOTE]
18
+
>[!NOTE]
22
19
> To be able to use the **SubCode** property, you must use Microsoft Visual Studio 2005. The **SubCode** property does not exist in earlier versions of Visual Studio.
23
20
24
-
For a list of error codes, see [Excel Services Error Codes](excel-services-error-codes.md).
25
-
### To capture error codes when using SOAP
21
+
For a list of error codes, see [Excel Services Error Codes](excel-services-error-codes.md).
26
22
23
+
### To capture error codes when using SOAP
27
24
28
25
1. After adding a Web reference to the Excel Web Services, add the following using directive so that you can use the **SoapException** class without having to qualify it with a full namespace:
Thefollowingprogram (aconsoleapplication) usesthe**SubCode**propertytocapturetheerrorcodes. Theprogramtakesdifferentactionsbasedontheerrorcodethatiscaught. Youcan, for example, intentionally pass in a nonexistent sheet name to trigger a SOAP exception. In this case, the following SOAP exception message is returned:
127
-
128
-
129
-
130
124
131
125
```
132
-
133
126
The sheet that was requested could not be found. Please try a different one.
0 commit comments