I'm logging data from a CSV file to google sheet using gspread in python with values_update().
I then use gspread-formatting to create a background color. Since I haven’t found a way to format colors from the CSV, my script reads the data in column C where I store the color I want to use.
After creating the background color I want to delete column C including the header (row 1)
What is the best way to delete or remove an entire column? Alternatively, if there is a way to log the background color straight from the CSV file that will be even better.
projectSheet.values_update(
worksheet, params={'valueInputOption': 'USER_ENTERED'},
body={'values': list(csv.reader(open(csvName)))}
)
blue = [cell.row for cell in worksheet.findall('Blue')]
for i in blue:
fmtBlue = cellFormat(
backgroundColor=color(0.5, 0.5, 1),
textFormat=textFormat(bold=False, foregroundColor=color(0, 0, 0)),
horizontalAlignment='CENTER'
)
rows = f'A{i}:J{i}'
format_cell_range(worksheet, rows, fmtBlue)
worksheet.delete_column('C')???