0

the code is as follows.,

    function getResponse() {
      var request = new SP.WebRequestInfo();
      console.log(hostweburl);
      request.set_url(hostweburl + "/sites/techvision/
      _vti_bin/ExcelREST.aspx/Shared%20Documents/Template.xlsb/
      model");
      var context = SP.ClientContext.get_current();
      var response = SP.WebProxy.invoke(context, request);
      console.log("making the request to the sharepoint");
      context.executeQueryAsync(
      function(sender, args) {
        onGetTemplateInfo1(response);
      },
      function(sender, args) {
        onGetTemplateInfoFailure(sender,args);
      }
    );
    }

but it is giving me the error. "An exception occurred while processing the request… reference not set to an instance of an object.'."

2
  • Can you please tell me on which line in your code do you get the error? Can you please post the stacktrace as well?
    – Hardik
    Commented Jun 7, 2016 at 14:03
  • in onGetTemplateInfo1(response); function when i print response object Commented Jun 8, 2016 at 5:45

1 Answer 1

0

Using the Excel Services REST API is as simple as specifying a URI (Uniform Resource Identifier) in your web browser. In this post we’ll walk through the details of the URI syntax.

Kindly check the details for how to use REST API for excel in below URL.

Excel Services in SharePoint 2010 REST API Syntax

1
  • You will get the xslb as a response as per the above link. It is byte XLS file so you will get the same result. Please put the onGetTemplateInfo1 function in your question to understand it properly.
    – Hardik
    Commented Jun 8, 2016 at 14:27

Your Answer

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

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