I'm trying to update one cell that has CheckBox data type. Is there any way to set CheckBox to state Checked trough the API? Can't find any c# example...
Asked
Active
Viewed 471 times
0
-
1what if you simply set value to `True/False` or `0/1`? – Lei Yang Jan 14 '22 at 05:51
1 Answers
2
Checking or unchecking checkboxes with the Google Sheets API is equivalent to updating the cell values to the booleans true
and false
.
- Use the method spreadsheets.values.update
- Base your request on the featured example code for C#
- I am not an expert in C#, but the value range in your request body should look something like this:
var list = new List<object>() { true };
requestBody.Values = new List<IList<object>> { list };
Reference for updating vlaues in C#:

ziganotschka
- 25,866
- 2
- 16
- 33
-
My bad, didn't check send types by myself. Thanks for help it works. – SkyDancer Jan 14 '22 at 12:05