In this article we will be seeing how to access the Tables and REST API Return Formats. Here is Part 2 Table:
URL Structure: We can access resources like charts, PivotTables, tables, and named ranges in a workbook directly through a URL using REST API. Each REST URL in Excel Services is built of three parts.
Example: http://servername:1111/sites/VJTesting/_vti_bin/excelrest.aspx/Shared%20Documents/ExcelChart.xlsx/model REST aspx Page URI - http://servername:1111/sites/VJTesting/_vti_bin/excelrest.aspx Workbook Location - /Shared%20Documents/ExcelChart.xlsx Resource Location- /model We can use the resource location to get the particular element from the excel workbook. Tables: In this section we will be seeing how to access the tables using the REST URL. REST URL: http://serverName:1111/sites/VJTesting/_vti_bin/excelrest.aspx/Shared%20Documents/ExcelChart.xlsx/model/Tables('EmpDetails') REST aspx Page URI - http://servername:1111/sites/VJTesting/_vti_bin/excelrest.aspx Workbook Location - /Shared%20Documents/ExcelChart.xlsx Resource Location- /model/Tables('EmpDetails') The output will be as shown in the following
REST API Return Formats: REST API supports the following return formats
?$format=html - REST API returns an HTML representation of the item that can be displayed by the web browser. ?$format=atom - REST API returns an ATOM feed representation of the item. ?$format=image - REST API returns an image file (format is always PNG). ?$format=workbook - REST API returns the workbook which can then be opened in Excel or saved.
Item
Format
Top of Form
/ModelBottom of Form
?atom, ?workbook
/Model/Ranges
?atom
/Model/Ranges('RangeName')
?atom, ?html
/Model/Charts
/Model/Charts('ChartName')
?atom, ?image
/Model/Tables
/Model/Tables('TableName')
/Model/PivotTables
/Model/PivotTables('PivotTableName')
?atom, ?html Bottom of Form
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: