问题描述:

 $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;

I want to put bottom border in the merged cell, how can i do this?

网友答案:

Check out this 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);
相关阅读:
Top