How to add checkboxes into cell using google sheets api v4

by Евгений Боченков   Last Updated October 18, 2018 12:03 PM

Is this is real or i just didn't find it in documentation? And how i can fill only column with checkboxes?



Answers 1


I found it. It's look like that:

service.spreadsheets().batchUpdate(spreadsheetId=spreadsheet_id, body={
    'requests':
        [
            {
                'repeatCell':
                    {
                        'cell': {'dataValidation': {'condition': {'type': 'BOOLEAN'}}},
                        'range': {'sheetId': 0, 'startRowIndex': 1, 'endRowIndex': added_branches + 1,
                                  'startColumnIndex': 4,
                                  'endColumnIndex': 5},
                        'fields': 'dataValidation'
                    }
            },
            {

            },
        ]
}).execute()

enter image description here

Евгений Боченков
Евгений Боченков
October 18, 2018 12:00 PM

Related Questions




Copying values between google sheets

Updated July 26, 2018 21:03 PM