3.1.1.4 Range Entity

The Range entity represents a range in the spreadsheet.

The protocol server will return a value as follows:

  • If a URL parameter with a key of "$format" and value of "html" is passed, or the ACCEPT HTTP header, as specified in [RFC2616] fits the content type: "text/html" then the protocol server will return an HTML fragment corresponding to the requested range.

  • Accessing the Range Entity as an entity as specified in [MS-ODATA] (or with a URL parameter with a key of "$format" and value of "atom") will result in a single Entity Type containing the complex type Range as defined in section 2.2.4.1.1 in a content element with a type attribute set to "application/xml", as specified in [MS-ODATA].

  • Accessing the Range Entity with a URL parameter with a key of "$format" and value of "json" will result in a JSON text containing the complex type Range as defined in section 2.2.4.1.2.

  • Accessing the Range Entity with a URL parameter with a key of "$format" and value of "image" will result in a PNG image of the requested range. Also, the protocol server supports cropping and scaling the resulting image when optional URL parameters are specified. These parameters are described in the following table:

    Parameter Name

    Description

    $cropw

    An unsigned integer representing the width in pixels used to limit the number of columns of the range of the returned image. The cumulative pixel width of all visible columns in the requested range will be compared with $cropw. If the cumulative width of a column is equal or exceeds $cropw, then that column will be last one rendered into the returned image.

    $croph

    An unsigned integer representing the height in pixels used to limit the number of rows of the range of the returned image. The cumulative pixel height of all visible columns in the requested range will be compared with $croph. If the cumulative height of a column is equal or exceeds $croph, then that row will be last one rendered into the returned image.

    $width

    An unsigned integer representing the width in pixels the returned image needs to scale to. The protocol server only provides scaling down and preserves the aspect ratio of the original image and that can cause that the width of the resulting image is smaller than $width.

    $height

    An unsigned integer representing the height in pixels the returned image needs to scale to. The protocol server only provides scaling down and preserves the aspect ratio of the original image and that can cause that the height of the resulting image is smaller than $height.