Condividi tramite


Resources URI for Excel Services REST API

Applies to: SharePoint Server 2010

This topic lists the entities that you can link to directly by using the REST API in Excel Services.

Base REST URL

Following is an example of a REST URL to a specific element in a workbook:

http://<ServerName>/_vti_bin/ExcelRest.aspx/<DocumentLibrary>/<FileName>/<ResourceLocation>

A relative REST URL is based off the base REST URL. Following is an example of a base REST URL to a specific workbook:

http://<ServerName>/_vti_bin/ExcelRest.aspx/<DocumentLibrary>/<FileName>

For example, if you have a workbook named "sampleWorkbook.xlsx" in the following document library:

http://<ServerName>/Docs/Documents/sampleWorkbook.xlsx

The base REST URL to the workbook is:

http://<ServerName>/_vti_bin/ExcelRest.aspx/Docs/Documents/sampleWorkbook.xlsx

Resources URI

Table 1 shows all the accessible resources in the Excel Services REST API. To access a particular resource, append the resource location to the base REST URL to a workbook.

Table 1. Accessible resources in the Excel Services REST API

Resource Location

Format

Example

Notes

/model

Atom (default)

/model

Returns an Atom feed with the resources supported by the Excel Services REST API. The supported resources are ranges, charts, tables, and PivotTables.

/model

workbook

/model?$format=workbook

This is the workbook. Supported workbook formats are xlsx, xlsb, and xlsm.

/model/Ranges

Atom (default)

/model/Ranges?$format=atom

An Atom feed that listis all the named ranges in the workbook.

/model/Ranges('[Name]')

HTML (default)

/model/Ranges('MyRange')?$format=html

An HTML fragment for the requested range.

/model/Ranges('[Name]')

Atom

/model/Ranges('MyRange')?$format=atom

An Atom entry that contains an XML representation of the data within the range.

/model/Charts

Atom (default)

/model/Charts?$format=atom

An Atom feed that lists all the charts in the workbook.

/model/Charts('[Name]')

Image (default)

/model/Charts('MyChart')?$format=image

An image of the chart. The image is in Portable Network Graphics (PNG) format.

/model/Tables

Atom (default)

/model/Tables?$format=atom

An Atom feed that lists all the available tables in the workbook.

/model/Tables('[Name]')

HTML (default)

/model/Tables('MyTable')?$format=html

An HTML fragment for the requested table.

/model/Tables('[Name]')

Atom

/model/Tables('MyTable')?$format=atom

An Atom entry that contains an XML representation of the data within the table.

/model/PivotTables

Atom (default)

/model/PivotTables?$format=atom

An Atom feed that lists all the available PivotTables in the workbook

/model/PivotTables('[Name]')

HTML (default)

/model/PivotTables('MyPivotTable)?$format=html

An HTML fragment for the requested PivotTable.

/model/PivotTables('[Name]')

Atom

/model/PivotTables('MyPivotTable')?$format=atom

An Atom entry that contains an XML representation of the data within the PivotTables.

See Also

Concepts

Basic URI Structure and Path