Vertical Text in PHPExcel Cell

rb vishnu picture rb vishnu · Feb 21, 2014 · Viewed 14.9k times · Source

How can I print text vertically in a cell using PHPExcel class ?

enter image description here

need to print like the above figure.

Answer

Kumar V picture Kumar V · Feb 21, 2014

I think you can do by rotating text:

Try this code:

$objPHPExcel->getActiveSheet()->getStyle('B7')->getAlignment()->setTextRotation(90);

Reference:

http://phpexcel.codeplex.com/discussions/21676