HPExcel->getActiveSheet()->getStyle(''D13′)->getBorders()->getTop()->getColor()->setARGB(''FF993300′);
$objPHPExcel->getActiveSheet()->getStyle(''D13′)->getBorders()->getBottom()->getColor()->setARGB(''FF993300′);
$objPHPExcel->getActiveSheet()->getStyle(''E13′)->getBorders()->getTop()->getColor()->setARGB(''FF993300′);
$objPHPExcel->getActiveSheet()->getStyle(''E13′)->getBorders()->getBottom()->getColor()->setARGB(''FF993300′);
$objPHPExcel->getActiveSheet()->getStyle(''E13′)->getBorders()->getRight()->getColor()->setARGB(''FF993300′);
设置填充颜色
$objPHPExcel->getActiveSheet()->getStyle(''A1′)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
$objPHPExcel->getActiveSheet()->getStyle(''A1′)->getFill()->getStartColor()->setARGB(''FF808080′);
$objPHPExcel->getActiveSheet()->getStyle(''B1′)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
$objPHPExcel->getActiveSheet()->getStyle(''B1′)->getFill()->getStartColor()->setARGB(''FF808080′);
加
图片 $objDrawing = new PHPExcel_Worksheet_Drawing();
$objDrawing->setName(''Logo'');
$objDrawing->setDescription(''Logo'');
$objDrawing->setPath(''./images/officelogo.jpg'');
$objDrawing->setHeight(36);
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
$objDrawing = new PHPExcel_Worksheet_Drawing();
$objDrawing->setName(''Paid'');
$objDrawing->setDescription(''Paid'');
$objDrawing->setPath(''./images/paid.png'');
$objDrawing->setCoordinates(''B15′);
$objDrawing->setOffsetX(110);
$objDrawing->setRotation(25);
$objDrawing->getShadow()->setVisible(true);
$objDrawing->getShadow()->setDirection(45);
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
在默认sheet后,创建一个worksheet
echo date(''H:i:s'') . " Create new Worksheet objectn";
$objPHPExcel->createSheet();
$objWriter = PHPExcel_IOFactory::createWriter($objExcel, ''Excel5'');
$objWriter-save(''php://output'');