row auto-height with wrap text

1,677 views
Skip to first unread message

patri...@gmail.com

unread,
Jun 18, 2016, 4:05:36 AM6/18/16
to openpyxl-users
Hi, guys. I am using wrap text, but row doesn't set auto-height. How can i set auto-height row with wrap text? 

Charlie Clark

unread,
Jun 18, 2016, 4:23:37 AM6/18/16
to openpyx...@googlegroups.com
Am .06.2016, 10:05 Uhr, schrieb <patri...@gmail.com>:

> Hi, guys. I am using wrap text, but row doesn't set auto-height. How can
> i set auto-height row with wrap text?

There is no "auto-height" but you can set the height for any row using the
RowDimension object

rd = ws.row_dimensions[3] # row 3
rd.height = 25 # height in points

http://openpyxl.readthedocs.io/en/default/api/openpyxl.worksheet.dimensions.html?highlight=rowdimension#openpyxl.worksheet.dimensions.RowDimension

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
Reply all
Reply to author
Forward
0 new messages