Exemplo n.º 1
0
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getFont()->setBold(true);
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getFont()->setSize(12);
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getAlignment()->setHorizontal('center');
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getBorders()->getBottom()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK);
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getBorders()->getRight()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
             $objPHPExcel->getActiveSheet()->getStyle($CONF_NEXTIME['report_columns'][$colnum] . $rowCounter)->getBorders()->getLeft()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
             $colnum += 1;
             break;
     }
 }
 //end foreach
 $objPHPExcel->getActiveSheet()->getStyle('R' . $rowCounter)->getBorders()->getRight()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK);
 $objPHPExcel->getActiveSheet()->getStyle('R' . $rowCounter)->getBorders()->getLeft()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK);
 //and now for the by-project hours breakdown area
 $output = $ts->selectByProjectHoursByUser($A['uid'], $startStamp, $endStamp);
 //m29 is the project number, n29 is the total hours and so on
 $prjrow = $finalRowCount + 2;
 $objPHPExcel->getActiveSheet()->mergeCells("A{$prjrow}:D{$prjrow}");
 $objPHPExcel->getActiveSheet()->setCellValue('A' . $prjrow, 'TOTAL PER PROJECT');
 $objPHPExcel->getActiveSheet()->getStyle('A' . $prjrow)->getFont()->setUnderline(UNDERLINE_SINGLE);
 $objPHPExcel->getActiveSheet()->getStyle('A' . $prjrow)->getFont()->setSize(12);
 $objPHPExcel->getActiveSheet()->getStyle('A' . $prjrow)->getFont()->setBold(true);
 $objPHPExcel->getActiveSheet()->getStyle('A' . $prjrow)->getAlignment()->setHorizontal('center');
 $prjrow++;
 $prowStart = $prjrow;
 $flag = false;
 foreach ($output as $key => $value) {
     $objPHPExcel->getActiveSheet()->mergeCells("A{$prjrow}:C{$prjrow}");
     $objPHPExcel->getActiveSheet()->setCellValue('A' . $prjrow, $key);
     $objPHPExcel->getActiveSheet()->setCellValue('D' . $prjrow, $value);