Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python XLWT can not specify row height

Tags:

python

xlwt

I'm trying to use xlwt with row.(i).height, but I had no result.

My Code:

import xlwt
book = xlwt.Workbook(encoding='latin-1')
sheet = sheet.add_sheet('KPI.TiempoRespuesta',cell_overwrite_ok=True)
sheet.write(1, 4, "BLABLABLABLABLABLABLABLABLABLABLABLA")
sheet.row(4).height = 256*20
book.save("book.xls")

I want to augment cell height ;/, but row.(i).height do nothing

like image 791
R. Stark Avatar asked Dec 16 '13 14:12

R. Stark


1 Answers

You should tell xlwt row height and default font height do not match:

sheet.row(4).height_mismatch = True
sheet.row(4).height = 256*20
like image 107
iMom0 Avatar answered Nov 06 '22 00:11

iMom0