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
Post a Comment