3.1.4.28 SetRange

This operation is used to set values to a range of worksheet cells on a workbook.

 <wsdl:operation name="SetRange">
     <wsdl:input message="SetRangeSoapIn" />
     <wsdl:output message="SetRangeSoapOut" />
 </wsdl:operation>

The protocol client sends a SetRangeSoapIn request message, and the protocol server responds with a SetRangeSoapOut response message, as follows:

  1. If 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.

  2. If the SheetName element inside sheetRange 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 InvalidSheetName.

  3. 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 sheetRange element.

  4. 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 sheetRange element.

  5. 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.

  6. If any of the worksheet cells of type string in the cellsArray element start with and equals sign (=), the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be FormulaEditingNotEnabled.

  7. 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<43> 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 sheet (2) with the name specified in the SheetName element inside sheetRange.

SpecifiedItemNotFound

The user does not have 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 range requested to be set intersected with a formula or a table header.