PHPExcel cell height only works on empty cell -
i've read couple of examples on google cannot find issue.
to set cell height use:
$objphpexcel->getactivesheet()->getdefaultrowdimension()->setrowheight(-1);
this set cell height "auto".
guess text/data deside it's height?!
i have tried several values like: 4, 10 etc..
strange cell without text change height.
i'm thinking: text/font has margin-top value?
cannot see type of height limit, should not prob.
code
//set font size $objphpexcel->getactivesheet()->getstyle("a1:i".$highestrow)->getfont()->setsize(4); //set row size $objphpexcel->getactivesheet()->getdefaultrowdimension()->setrowheight(6);
example
i'd cell height height text!
the row height limit 409.50 (546 pixels), ms excel limit officeopenxml (xlsx)format. it's phpexcel doesn't enforce it.
and if @ of examples (such 01simple.php
) you'll see height being set automatically rows 8 , 10. in case, looks though have newline character before text you're setting in cells, they're spanning 2 lines, , autoheight setting accordingly.
Comments
Post a Comment