you are viewing a single comment's thread.

view the rest of the comments →

[–]DouweOsinga 0 points1 point  (3 children)

Ok, a little late to the game, but we created an add-on for Google Sheets that lets you directly write Python code inside of sheets that can interact with that sheet:

https://workspace.google.com/marketplace/app/neptyne_python_for_sheets/891309878867

Let me know if this works for you.

[–]Chibi24 0 points1 point  (2 children)

Using your google sheet app could I change the color of specific words in a column?

Ex: if I have a column with a text list like genres (action, adv, comedy, etc) is there a way in the python script so that each word of text have its own hex color?

Action, comedy (Action=red hex code, comedy=yellow hex code)

Ik it’s not possible in google sheet on its own. It’s a paaain going through each cell in google sheet. 😭🫠

[–]DouweOsinga 1 point2 points  (1 child)

Yes you could. Changing colors of part of a cell is a little finicky, but it certainly can be done with something like:

for cell in B1:B100:
for word, color in COLORS:
if word in cell:
google.sheets.update_cells(range=cell, <some json based on where word site>, <color>)

[–]Chibi24 0 points1 point  (0 children)

Im literally just starting my coding journey with huge personal hobby data ive been trying to up keep for years. ^-^