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

enter image description here

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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -