spreadsheets.values.batchUpdate using Golang
Flow :
In my sample script, the script was made using the Quickstart. The flow to use this sample script is as follows.
- For Go Quickstart, please do Step 1 and Step 2.
- Please put
client_secret.jsonto the same directory with my sample script. - Copy and paste my sample script, and create it as new script file.
- Run the script.
- When
Go to the following link in your browser then type the authorization code:is shown on your terminal, please copy the URL and paste to your browser. And then, please authorize and get code. - Put the code to the terminal.
- When
Done.is displayed, it means that the update of spreadsheet is done.
Request body :
For Spreadsheets.Values.BatchUpdate, BatchUpdateValuesRequest is required as one of parameters. In this case, the range, values and so on that you want to update are included in BatchUpdateValuesRequest. The detail information of this BatchUpdateValuesRequest can be seen at godoc. When it sees BatchUpdateValuesRequest, Data []*ValueRange can be seen. Here, please be carefull that Data is []*ValueRange. Also ValueRange can be seen at godoc. You can see MajorDimension, Range and Values in ValueRange.