79399421

Date: 2025-01-30 09:44:56
Score: 2.5
Natty:
Report link

Thanks,I was using wrong rgb codes.I just did a print of the cell font color and it directed me to the right values.I see Moken has advised the same correction.

Var1 = ""
Var2 = ""   
if source_sheet['C11'].value == None:
Var1 = "No Data"
elif source_sheet['C11'].font.color.rgb == "FF92D050":
Var1 = "Green"
elif source_sheet['C11'].font.color.rgb == "FFFF0000":
Var1 = "Red"

print(Var1)

Regards Biru

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): Regards
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: beruoist