Hi guys,
So I’ve been playing on & off with Smartsheet API and have been able to post a row on a sheet succesfully using CURL on Windows via a batch file.
Now I need to do the same but for multiple rows from a CSV file. I read that I could do so if I insert an array variable per column within the json part of the CURL command. But, i don’t know how to do this in windows batch. Like I need to concatinate the string somehow.
any pointers?
Here is the code:
set c01[0]="0123456"
set c01[1]="0123457"
set c01[2]="0123458"
set c01[3]="0123459"
set c01[4]="0123450"
curl https://api.smartsheet.com/2.0/sheets/350958217883456/rows ^
-H "Authorization: Bearer abc1234bhyt5678poiu09876" ^
-H "Content-Type: application/json" ^
-X POST ^
-d “[{\"toBottom\":true, \"cells\": [{\"columnId\": 949033830246276, \"value\": " %c01 "}]}]"