是否可以将合并单元格的底部边框放在phpexcel中?

时间:2015-08-18 01:24:17

标签: php codeigniter phpexcel

 $objectSheet->setCellValue($c[$current_col].$current_row, 'Civil Status:');

 $objectSheet->mergeCells($c[$current_col].$current_row.':'.$c[$current_col + $width -1].$current_row);

 $current_col += $width;

我想在合并的单元格中放置底部边框,我该怎么做?

1 个答案:

答案 0 :(得分:0)

查看此thread

$objPHPExcel->getDefaultStyle()
->getBorders()
->getTop()
    ->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);

$objPHPExcel->getDefaultStyle()
->getBorders()
->getBottom()
    ->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);

$objPHPExcel->getDefaultStyle()
->getBorders()
->getLeft()
    ->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);

$objPHPExcel->getDefaultStyle()
->getBorders()
->getRight()
    ->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);