R. Stark
R. Stark

Reputation: 197

Python XLWT can not specify row height

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

Upvotes: 10

Views: 10758

Answers (1)

iMom0
iMom0

Reputation: 12931

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

Upvotes: 29

Related Questions