1

I'm working on a project where I need to integrate with Sharepoint Excel Services. I need to make a call to the REST API, passing parameters into a workbook, and then retrieving a named range. This is all well and good when I pass parameters in the query string, like this:

https://test.sharepoint.com/exceldemo/_vti_bin/excelrest.aspx/shared%20documents/test.xlsx/model/tables('Print_Area')?format=html&Ranges(%27PlanAssets%27)=$500,000.00

In the example above, I'm retrieving the Print_Area named range in html format after inserting $500,000.00 into the PlanAssets named range.

The problem is that I need to pass a bunch of parameters and will quickly run out of space in the URL. This list of unsupported features doesn't offer up a solution to the 2000 character URL limit.

The simple solution for normal HTTP requests would be to move my URL parameters to POST parameters on the request, but I can't find any documentation about this.

Is there any way to overcome the URL limit and pass a large number of parameters?

mellis481
  • 4,332
  • 12
  • 71
  • 118
  • possible duplicate of [OData Url Length Limitations](http://stackoverflow.com/questions/4247985/odata-url-length-limitations) – Daniel Jun 07 '14 at 01:43

1 Answers1

0

If you want to post data to server, then OData Action is a good choice. POST is needed to invoking an action. please refer this sample: https://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/ODataActionsSample/.

Tan Jinfu
  • 3,327
  • 1
  • 19
  • 20
  • Where in the ODataActionsSample does it POST data to a Sharepoint server? I only see the posting of data to an MVC controller. – mellis481 Jun 09 '14 at 12:52
  • No it doesn't post data to a Sharepoint server. Where the data is posting to depends on the odata service url. In this sample, these URLs are used: POST http://localhost:44221/odata/CreateMovie, POST http://localhost:44221/odata/Movies/ODataActionsSample.Models.CheckOutMany. Just open fiddler and run the sample, you'll get the payloads in fiddler. – Tan Jinfu Jun 10 '14 at 00:39