3.1.4.29 SetRangeA1
This operation is used to set values to a range of worksheet cells on a workbook.
-
<wsdl:operation name="SetRangeA1"> <wsdl:input message="SetRangeA1SoapIn" /> <wsdl:output message="SetRangeA1SoapOut" /> </wsdl:operation>
The protocol client sends a SetRangeA1SoapIn request message, and the protocol server responds with a SetRangeA1SoapOut response message, as follows:
If sheetName, range, or cellsArray is not present, the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be InternalError.
If range is empty, the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be RangeParseError.
If sheetName is empty, the protocol server MUST use the first worksheet on the workbook unless a worksheet can be determined from range, in which case the worksheet, as determined from range, MUST be used.
If a worksheet cannot be determined from range, the protocol server MUST use range on the worksheet determined by sheetName to locate the range to set.
Each element inside the cellsArray element MUST be of type ArrayOfAnyType and be a row (2) of worksheet cells sent to the protocol server. The number of rows in cellsArray MUST be equal to the number of rows specified in the range element, unless not explicitly specified.
Each element inside each of the ArrayOfAnyType type nested inside cellsArray MUST be a single worksheet cell. The number of elements inside each such nested ArrayOfAnyType MUST be equal to the number of columns specified in the range element, unless not explicitly specified. Each nested ArrayOfAnyType MUST have the same number of elements.
The protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2, with the value ObjectTypeNotSupported in the id element of the ExcelServerMessage, if any of the worksheet cells in the cellsArray element are one of the following:
Not empty and with the xsi:nil attribute set to true.
Not in one of the following types: boolean, dateTime, decimal, double, float, int, short, string, or unsigned byte.
If any worksheet cell of type string in the cellsArray element starts with "=", the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be FormulaEditingNotEnabled.
The protocol server MUST ignore any worksheet cells in cellsArray that intersect with a PivotTable on the workbook.
In the event of an application error on the protocol server during this operation, the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be one of the values specified in section 2.2.9.4, and SHOULD<44> be one of the following values.
Id |
Description |
---|---|
InvalidOrTimedOutSession |
See section 2.2.9.5. |
RetryError |
See section 2.2.9.5. |
OperationCanceled |
See section 2.2.9.5. |
InternalError |
See section 2.2.9.5. |
MultipleRequestsOnSession |
See section 2.2.9.5. |
MaxRequestDurationExceeded |
See section 2.2.9.5. |
InvalidSheetName |
The protocol server could not find a worksheet with the name specified in the SheetName element inside sheetRange. |
SpecifiedItemNotFound |
The user does not have the Open Item permission on the workbook used by the session (2), and the range requested to be set is not a single worksheet cell, or the worksheet cell in the workbook is not a workbook parameter. |
SetRangeFailure |
The requested range to set intersected with a formula or a table header. |
DimensionMismatch |
There was a mismatch in the number of rows or number of columns between cellsArray and range. |