basically I have table (8 rows x 3 columns) within the Google slides presentation, that I want to change background color to via the API.
First item of my list of rgb color values:
cons_data_lst[0][1][-1]
>>> [0.5882353, 0.7764706, 0.4862745]
My function to produce a request body:
def update_table_cell_colors(color_list):
req = [{
'updateTableCellProperties':{
'objectId': 'obj_id',
'tableRange': {
'location': {
'rowIndex': 1,
'columnIndex': 2,
},
'rowSpan': 1,
'columnSpan': 1,
},
'tableCellProperties':{
'tableCellBackgrounFill':{
'solidFill':{
'color':{
'rgbColor':{
'red': color_list[0],
'green': color_list[1],
'blue': color_list[2],
}
}
}}
}}} ]
return req
When I send batch update to presentation I receive the following error:
HttpError: https://slides.googleapis.com/v1/presentations/1dzxYYPuqTM3VhwaR93Ep2jj_9Y2NCkSBsVBnmN6lcOs:batchUpdate?alt=json returned "Invalid JSON payload received. Unknown name "table_cell_backgroun_fill" at 'requests[0].update_table_cell_properties.table_cell_properties': Cannot find field.". Details: "[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'requests[0].update_table_cell_properties.table_cell_properties', 'description': 'Invalid JSON payload received. Unknown name "table_cell_backgroun_fill" at \'requests[0].update_table_cell_properties.table_cell_properties\': Cannot find field.'}]}]">
Given a list of different rgb color values, how can I create a request body to update all columns (1 to 2) row (there are 8) text background color ?
Thank you.