Skip to content

Instantly share code, notes, and snippets.

@timhall
Last active October 23, 2017 22:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timhall/c88e52a71acc45243bbb to your computer and use it in GitHub Desktop.
Save timhall/c88e52a71acc45243bbb to your computer and use it in GitHub Desktop.
Excel-REST - Smartsheet API: Update
' curl https://api.smartsheet.com/1.1/row/{rowId}/cells \
Dim Request As New RestRequest
Request.Resource = "row/{rowId}/cells"
Request.AddUrlSegment "rowId", "RowId..."
' -H "Authorization: Bearer ACCESS_TOKEN" \
Request.AddHeader "Authorization", "Bearer ACCESS_TOKEN is set in authenticator"
' -H "Content-Type: application/json" \
Request.RequestFormat = json
' -X PUT \
Request.Method = httpPUT
' -d '[ {"columnId": 3738748463671172, "value": "Revision 2"}, {"columnId": 5427598323935108, "value": "On Time", "strict": false} ]'
Dim Data As New Collection
Data.Add New Dictionary
Data(1).Add "columnId", 3738748463671172
Data(1).Add "value", "Revision 2"
Data.Add New Dictionary
Data(2).Add "columnId", 5427598323935108
Data(2).Add "value", "On Time"
Data(2).Add "strict", False
' Automatically converted to json based on RequestFormat
Request.AddBody Data
' Alternative (you have to be careful with the quotes for json)
Request.AddBodyString "[{""columnId"": 3738748463671172, ""value"": ""Revision 2""}, {""columnId"": 5427598323935108, ""value"": ""On Time"", ""strict"": false}]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment