axlsx icon indicating copy to clipboard operation
axlsx copied to clipboard

Auto-height

Open jurriaan opened this issue 13 years ago • 55 comments
trafficstars

Axlsx has support for autowidth, but what do you think about auto height?, for columns containing multiple rows of text.

jurriaan avatar Mar 28 '12 13:03 jurriaan

+1

cj avatar Jul 25 '12 19:07 cj

+1

horaciob avatar Nov 07 '12 14:11 horaciob

+1

scanferla avatar Nov 11 '12 16:11 scanferla

+1

morkevicius avatar Feb 03 '13 18:02 morkevicius

+1

dszczyt avatar Feb 13 '13 16:02 dszczyt

+1

indrekj avatar Apr 26 '13 11:04 indrekj

+1

murphysw avatar Jul 10 '13 18:07 murphysw

Can't you accomplish this through word wrap?

rafadc avatar Oct 02 '13 10:10 rafadc

+1

osegrums avatar Oct 07 '13 06:10 osegrums

+1

rvsingh avatar Nov 07 '13 19:11 rvsingh

+1

rujaun avatar Nov 20 '13 06:11 rujaun

+1

panasyuk avatar Nov 29 '13 03:11 panasyuk

+1

songjiayang avatar Mar 19 '14 06:03 songjiayang

+1 Is there any workaround for this in the meantime that people have come up with?

hofdesu avatar Mar 31 '14 06:03 hofdesu

You can just use word wrap or you can count the number of lines and multiply that by the +/- the font size

jurriaan avatar Mar 31 '14 12:03 jurriaan

could you do a gist for handling this? or is there a way to query the worksheet for the number of rows given a fontSize and a certrain string of text?

trestles avatar Apr 01 '14 03:04 trestles

Yeah, so I was using wordwrap but still had rows and words cut off.

Ended up writing a helper to do similar to what you suggest @jurriaan . Checked the cells autowidth value, then taking in to account that, any new lines, and a bit of a buffer for whitespace at the end of each line, assign a new row hight. .... A bit (quite) flakey, but quick, and it will do the trick in the short term.

hofdesu avatar Apr 08 '14 07:04 hofdesu

+1

jfrux avatar Mar 05 '15 20:03 jfrux

+1

Wolfer avatar Jun 04 '15 06:06 Wolfer

@hofdesu can you share the helper re: calculating the height?

jweissig avatar Aug 18 '15 03:08 jweissig

@hofdesu yes, could you please show your helper?

jmuheim avatar Nov 11 '15 15:11 jmuheim

+1

sathibabu-nyros avatar Jan 25 '16 12:01 sathibabu-nyros

+1

aschyiel avatar Mar 01 '16 02:03 aschyiel

+1

arturtr avatar Jul 13 '16 04:07 arturtr

+1

raphaottoni avatar Jul 28 '16 21:07 raphaottoni

+1

codexorange avatar Nov 02 '16 22:11 codexorange

Hello @randym, how one should approach a PR for this feature? what's to take into account?

vjustov avatar Dec 18 '16 16:12 vjustov

+1

xjcbruce avatar Dec 30 '16 07:12 xjcbruce

+1

flashharry82 avatar Jan 06 '17 12:01 flashharry82

+1

karamosky avatar Jan 11 '17 10:01 karamosky