|
@@ -1725,24 +1725,24 @@ function excelRCData($summaryData,$cellCount,$year){
|
|
$obj = new PHPExcel ();
|
|
$obj = new PHPExcel ();
|
|
|
|
|
|
//设置宽高
|
|
//设置宽高
|
|
- $colNum=1;
|
|
|
|
|
|
+ $colNum=1;$maxCol='ZZ';
|
|
for ($col='A';$colNum<=$cellCount;$col++){
|
|
for ($col='A';$colNum<=$cellCount;$col++){
|
|
$obj->getActiveSheet()->getColumnDimension($col)->setWidth(18);
|
|
$obj->getActiveSheet()->getColumnDimension($col)->setWidth(18);
|
|
cellColor($col.'1', 'ddebf7',$obj);cellColor($col.'2', 'ddebf7',$obj);
|
|
cellColor($col.'1', 'ddebf7',$obj);cellColor($col.'2', 'ddebf7',$obj);
|
|
cellColor($col.'3', 'ddebf7',$obj);
|
|
cellColor($col.'3', 'ddebf7',$obj);
|
|
$colNum++;
|
|
$colNum++;
|
|
|
|
+ if($colNum==$cellCount){
|
|
|
|
+ $maxCol=$col;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
$obj->getActiveSheet()->getDefaultRowDimension()->setRowHeight(18);
|
|
$obj->getActiveSheet()->getDefaultRowDimension()->setRowHeight(18);
|
|
|
|
|
|
//设置边框
|
|
//设置边框
|
|
- $styleThinBlackBorderOutline = array(
|
|
|
|
- 'borders' => array(
|
|
|
|
|
|
+ $styleThinBlackBorderOutline = array('borders' => array(
|
|
'allborders' => array( //设置全部边框
|
|
'allborders' => array( //设置全部边框
|
|
'style' => \PHPExcel_Style_Border::BORDER_THIN //粗的是thick
|
|
'style' => \PHPExcel_Style_Border::BORDER_THIN //粗的是thick
|
|
- ),
|
|
|
|
-
|
|
|
|
- ),
|
|
|
|
- );
|
|
|
|
|
|
+ ),),);
|
|
|
|
+ $obj->getActiveSheet()->getStyle( 'A1:'.$maxCol.'3')->applyFromArray($styleThinBlackBorderOutline);
|
|
|
|
|
|
// echo (int)($cellCount/26).'</br>';
|
|
// echo (int)($cellCount/26).'</br>';
|
|
// echo ($cellCount%26).'</br>';
|
|
// echo ($cellCount%26).'</br>';
|