当前位置: 动力学知识库 > 问答 > 编程问答 >

php - is it possible to put bottom border of a merged cell in 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;

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);
分享给朋友:
您可能感兴趣的文章:
随机阅读: