$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':Q'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
it is applying some top 3 to 4 pages but rest of pages this formatting is not applied kindly guide any one how i solve this problem this is very important for me.