Try to put data, and update it alignment, but got that error.
'field': 'data[81]', 'description': 'Invalid JSON payload received. Unknown name "fields" at 'data[81]': Cannot find field.'
data = {
"range": range_query,
"values": range_query_body,
"cell": {
"userEnteredFormat": {
"horizontalAlignment": "CENTER",
"verticalAlignment": "MIDDLE",
}
},
"fields": 'userEnteredFormat',
}
value_input_option = "RAW"
body = {
'valueInputOption': value_input_option,
'data': data
}
result = self.SHEET.values().batchUpdate(
spreadsheetId=spreadsheet_id, body=body).execute()
If remove cell, and field, it work.
you code hard to read
. This is due to my poor skill. I think that I have to study more. And when I could modify the script to more simple script, I would like to propose it again. So in the current stage, I would like to delete my answer, because I don't want to confuse other users. I deeply apologize for this again. – Tanaike