Answer the question
In order to leave comments, you need to log in
How to unload styles (fonts, colors) when uploading data to excel?
Load data into Excel (Google Docs) using a script. How to change the color, font of the uploaded fields when uploading data?
Answer the question
In order to leave comments, you need to log in
For example like this:
pythonhosted.org/xlutils/styles.html
or like this:
import xlwt
from datetime import datetime
style0 = xlwt.easyxf('font: name Times New Roman, color-index red, bold on',
num_format_str='#,##0.00')
style1 = xlwt.easyxf(num_format_str='D-MMM-YY')
wb = xlwt.Workbook()
ws = wb.add_sheet('A Test Sheet')
ws.write(0, 0, 1234.56, style0)
ws.write(1, 0, datetime.now(), style1)
ws.write(2, 0, 1)
ws.write(2, 1, 1)
ws.write(2, 2, xlwt.Formula("A3+B3"))
wb.save('example.xls')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question