Now with SharePoint 2010 we are be able to use REST to getting excel file data using Excel Services.
The syntax is very simple and quickly to understand. I will leave here some samples of how you can use REST to get data.
To access to your Excel file, you can use the following link:
http://<site>/_vti_bin/ExcelRest.aspx/<library>/<file>/Model
- <site> – SharePoint site (such as createit:8080)
- <library> – SharePoint document library that contains the excel file (such as Profits)
- <file> – The Excel file that you want to getting data (such as ProfitsV2.xlsx)
And then you will be able to get some different type of data as the following samples:
Used Excel file screenshot (to compare with data results using REST):
- Get workbook (ATOM format)
http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model
- Get a range (HTML format)
http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model/Ranges('WorldMarkets')
- Get a range (ATOM format)
http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model/Ranges('WorldMarkets')?$format=atom
- Get a graphic (Image format)
http://createbox/devplatform/_vti_bin/ExcelRest.aspx/Simulators/WorldMarkets.xlsx/Model/Charts('Chart%201')?$format=image