How do I format cells in Excel with python?
In particular I need to change the font of several subsequent rows to be regular instead of bold.
How do I format cells in Excel with python?
In particular I need to change the font of several subsequent rows to be regular instead of bold.
Using xlwt:
from xlwt import *font0 = Font()
font0.bold = Falsestyle0 = XFStyle()
style0.font = font0wb = Workbook()
ws0 = wb.add_sheet('0')ws0.write(0, 0, 'myNormalText', style0)font1 = Font()
font1.bold = Truestyle1 = XFStyle()
style1.font = font1ws0.write(0, 1, 'myBoldText', style1)wb.save('format.xls')