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
Asked
Active
Viewed 222 times
-3
-
1What 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 Answers
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')

Yaroslav Kornachevskyi
- 1,160
- 10
- 12