I'm trying to set a background color to the cells in Google Sheets.
Hello! I'm having problems inserting a row. I want to set a background color to it once added, but I'm not sure how to go about doing that. I did a lot of research, but I still don't understand it. I'm trying to write the following section of code. Thank you.
if(!oldMember._roles.includes(process.env.PFA_ID.toString()) &&
newMember._roles.includes(process.env.PFA_ID.toString()))
{
newMember.roles.cache.forEach(role => {
if (role.id.toString() == process.env.PFA_ID && !oldMember.roles.cache.has(role.id) && rolesList.includes(role.name))
{
googleSheets.spreadsheets.values.append({
auth,
spreadsheetId,
range: 'RANGOS',
valueInputOption: 'USER_ENTERED',
resource: {
values: [
['', newMember.nickname, newMember.id, new Date().toLocaleString().split(',')[0]] // Se le agrega con el nombre que esté... cuando se lo cambie será un update
],
backgroundColorStyle: {
}
},
})
}
})
}
I want it to be added with a background color, where cells do you want to change the background colors? And, what color do you want to set to the cells?