-3

enter image description here

I knew how to set the color of a cell, but now ,what I need is to set color of the text,not the whole cell

Dharman
  • 30,962
  • 25
  • 85
  • 135
Mcu
  • 11
  • 1
  • 3
  • 1
    What have you tried? How does your current code look. Please provide some code and try to refrain from using images – Björn Jul 22 '21 at 08:37
  • maybe my VPN is unstable, I uploaded the picture yesterday but I can only see it today – Mcu Jul 23 '21 at 01:55

1 Answers1

1
import xlwt

workbook = xlwt.Workbook()
sheet = workbook.add_sheet('test')

sheet.write(1, 1, (('red ', xlwt.easyfont('color_index red')), \
                   ('blue', xlwt.easyfont('color_index blue'))))

workbook.save('output.xls')

enter image description here