Tuesday, January 11, 2011

PHPExcel

PHPExcel make a nice looking table header
Actually is not really nice looking. Just a proper presentation...
There is too many code and I got no time to upload...

Sources from here
http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=32427

$headerStart = 22; //Start row

foreach( array( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'M', 'N', 'O', 'Q', 'R', 'S', 'T') as $alphabet){
$objPHPExcel->getActiveSheet()->getStyle($alphabet.$headerStart)->getAlignment()->setWrapText(true);
$objPHPExcel->getActiveSheet()->mergeCells( $alphabet.$headerStart.":".$alphabet.($headerStart+1));
$objPHPExcel->getActiveSheet()->getStyle($alphabet.$headerStart)->getAlignment()->setVertical( PHPExcel_Style_Alignment::VERTICAL_CENTER);
}

No comments: