3.1.4.17 GetRangeValuesA1

This operation is used to get the values contained in a specified range in a workbook.

 <wsdl:operation name="GetRangeValuesA1">
     <wsdl:input message="GetRangeValuesA1SoapIn" />
     <wsdl:output message="GetRangeValuesA1SoapOut" />
 </wsdl:operation>

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

  1. If sheetName 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. Depending on security settings, the protocol server MAY<26> return an error even if the requested range is present in the workbook.

  3. The protocol server determines the range to return in the following manner:

    • If sheetName is empty and the protocol server cannot determine the worksheet from the rangeName element, the protocol server MUST return the requested values from the range specified in rangeName on the first worksheet.

    • If sheetName is empty and the protocol server can determine the worksheet from the rangeName element, the protocol server MUST return the requested values from the range specified in rangeName on the determined worksheet.

    • If sheetName is not empty and exists in the workbook, and rangeName references a worksheet that is different than the worksheet referenced by sheetName, then the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be SheetRangeMismatch.

    • If sheetName is not empty and exists in the workbook, the protocol MUST return the range specified in rangeName from the worksheet that is specified in sheetName.

    • If sheetName is not empty and does not reference an existing worksheet in the workbook, the protocol server MUST return an ExcelServerMessage as specified in section 2.2.9.2. The id element of the ExcelServerMessage MUST be InvalidSheetName.

  4. Each element inside the cellValues element MUST be of type ArrayOfAnyType and be a row (2) of worksheet cells returned from the protocol server. The number of rows returned MUST be equal to the number of rows requested in the rangeName element.

  5. Each element inside each of the ArrayOfAnyType type nested inside cellValues MUST be a single workbook worksheet cell. The number of elements inside each such nested ArrayOfAnyType MUST be equal to the number of columns requested in the rangeName element.

  6. If formatted is true, all worksheet cells returned as part of the cellValues element MUST be of type string and MUST be number formatted according to how the worksheet cell is number formatted in the workbook.

  7. If formatted is false, all worksheet cells returned as part of the cellValues element MUST either be empty and with the xsi:nil attribute set to true when the worksheet cell does not contain data or one of the following types: boolean, double, string, or CellError (section 2.2.5.2).

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<27> be one of the values described in the following table.

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 that is in the sheetName element

SpecifiedItemNotFound

The protocol server cannot return the information requested because of security settings.

SheetRangeMismatch

The worksheet referenced by the sheetName element does not match the worksheet referenced by the rangeName element.