phpexcel表的一些设置

$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);

 

//set default styles
$objPHPExcel->getDefaultStyle()->getFont()->setName('Arial');  //设置默认的字体
 $objPHPExcel->getDefaultStyle()->getFont()->setSize(10);  //设置默认的字体大小

//set border color
 $objPHPExcel->getActiveSheet()->getStyle($key)->getBorders()->getTop()->getColor()->setARGB('FF993300');
 $objPHPExcel->getActiveSheet()->getStyle($key)->getBorders()->getRight()->getColor()->setARGB('FF993300');
 $objPHPExcel->getActiveSheet()->getStyle($key)->getBorders()->getBottom()->getColor()->setARGB('FF993300');
 $objPHPExcel->getActiveSheet()->getStyle($key)->getBorders()->getLeft()->getColor()->setARGB('FF993300');

  //设置行高
       $objPHPExcel->getActiveSheet()->getRowDimension($i)->setRowHeight(14.25);

posted @ 2014-09-09 09:48  天道酬勤,坚持!  阅读(507)  评论(0编辑  收藏  举报