php - how to make New lines in a cell using phpexcel -


i have problem php excel,

i want make new line in 1 cell can't, have tried using \n or <br /> itsn't work. code:

$objphpexcel->getactivesheet()->setcellvalue('h5', 'hello\nworld'); // need show in 2 line $objphpexcel->getactivesheet()->getstyle('h5')->getalignment()->setwraptext(true); 

fyi: format excel xls not xlsx. many :)

$objphpexcel->getactivesheet()->setcellvalue('h5', "hello\nworld"); $objphpexcel->getactivesheet()->getstyle('h5')->getalignment()->setwraptext(true); 

works me...

you should use double quotes when add escape sequences in php string.


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -