thinkphp设置excel表格的单元格边框颜色样式

thinkphp设置excel表格单元格边框

//设置单元格边框
$styleThinBlackBorderOutline = array(
    'borders' => array (
        'allborders' => array (                               //allborders  表示全部线框
            'style' => \PHPExcel_Style_Border::BORDER_THIN,   //设置border样式
            'color' => array ('argb' => 'FF000000'),          //设置border颜色
        ),
    ),
);
$objPHPExcel->getActiveSheet()->getStyle( 'A4:R11')->applyFromArray($styleThinBlackBorderOutline);

你可能感兴趣的:(thinkphp设置excel表格的单元格边框颜色样式)