'Invalid value at 'requests[0].update_cells.range' (type.googleapis.com/google.apps.sheets.v4.GridRange)
I'm trying to set the background of a single specific cell in column C via the NodeJS Google Sheets library. However, I am receiving this error
errors: [
{
message: `Invalid value at 'requests[0].update_cells.range' (type.googleapis.com/google.apps.sheets.v4.GridRange), "'Question of the day'!C2"`,
reason: 'invalid'
}
]
This is my method call
sheets.spreadsheets.batchUpdate({
auth: this._token,
spreadsheetId: this._spreadsheet,
resource: {
requests: [{
updateCells: {
range: '\'Question of the day\'!C' + (index + 1),
fields: 'userEnteredFormat',
rows: [{
values: [{
userEnteredFormat: {
backgroundColor: {
red: 1,
green: 0,
blue: 0
}
}
}]
}]
}
}]
}
})
The auth is correct as well as the spreadsheet. I tested the range the error throws in Google Sheets and it's a valid and working range.
I'm not sure why this is happening
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
