Home > database >  How to update Google sheet CheckBox using Google.Apis.Sheets.v4?
How to update Google sheet CheckBox using Google.Apis.Sheets.v4?

Time:01-15

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...

CodePudding user response:

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#:

  •  Tags:  
  • Related