I need to call excel service rest api as follows on the 'Summary' library in hostweb


The call should be executed from a SharePoint hosted app using JavaScript. I'm getting 'access denied' error when using below code in SharePoint hosted app.

        type: "GET",
        url: hostweburl + "/_vti_bin/ExcelREST.aspx/Summary/Group%20Summary%202014.xlsx/model/Tables?$'format=html'",
        success: function (data) {
        error: function (xhr, msg, e) {

If someone can point out a JavaScript code sample on how to use excel service from SharePoint hosted app it will be very helpful.

  • Where you able to get this working? Please share the source code if you do. Thanks, Karthik
    – user29641
    Jun 13, 2014 at 11:38
  • The issue is almost certainly with not passing the right headers to authenticate.
    – Kyle Hale
    Mar 30, 2016 at 4:19

1 Answer 1


Couldn't continue investigating how to do this on SharePoint app. I finally used a normal SharePoint webpage with following JavaScript.

        url: "../_vti_bin/ExcelRest.aspx/GroupStatistics/Group%20Summary%202014.xlsx/model/Tables('" + tableName + "')?$format=json",
        method: "GET",
        headers: { "Accept": "application/json; odata=verbose" },
        dataType: "json",
        success: function (data) {
            //work with data
        error: function (data) {
           // error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.