|
9 | 9 | require('../../config.inc.php'); |
10 | 10 |
|
11 | 11 | // Must be included BEFORE common.php |
12 | | -require_once('../../third_party/codeplex/PHPExcel.php'); |
| 12 | +require_once('../../vendor/autoload.php'); |
13 | 13 |
|
14 | 14 | require_once('common.php'); |
15 | 15 | require_once('displayMgr.php'); |
@@ -184,7 +184,7 @@ function createSpreadsheet($gui,$args,&$tplanMgr) |
184 | 184 | break; |
185 | 185 | } |
186 | 186 |
|
187 | | - $objPHPExcel = new PHPExcel(); |
| 187 | + $objPHPExcel = new \PhpOffice\PhpSpreadsheet\Spreadsheet(); |
188 | 188 | $lines2write = xlsStepOne($objPHPExcel,$style,$lbl,$gui); |
189 | 189 | $startingRow = count($lines2write); // MAGIC |
190 | 190 | $dataHeader = array(); |
@@ -226,8 +226,8 @@ function createSpreadsheet($gui,$args,&$tplanMgr) |
226 | 226 | // Final step |
227 | 227 | $tmpfname = tempnam(config_get('temp_dir'),"TL_ExecTimelineStats.tmp"); |
228 | 228 | $objPHPExcel->setActiveSheetIndex(0); |
229 | | - $xlsType = 'Excel5'; |
230 | | - $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $xlsType); |
| 229 | + $xlsType = 'Xls'; |
| 230 | + $objWriter = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($objPHPExcel, $xlsType); |
231 | 231 | $objWriter->save($tmpfname); |
232 | 232 |
|
233 | 233 | downloadXls($tmpfname,$xlsType,$gui,'TL_ExecTimelineStats_'); |
@@ -285,32 +285,32 @@ function initStyleSpreadsheet() { |
285 | 285 | array('font' => array('bold' => true), |
286 | 286 | 'borders' => |
287 | 287 | array('outline' => |
288 | | - array('style' => PHPExcel_Style_Border::BORDER_MEDIUM), |
| 288 | + array('style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_MEDIUM), |
289 | 289 | 'vertical' => |
290 | | - array('style' => PHPExcel_Style_Border::BORDER_THIN)), |
291 | | - 'fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID, |
| 290 | + array('style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN)), |
| 291 | + 'fill' => array('type' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID, |
292 | 292 | 'startcolor' => array( 'argb' => 'FF9999FF')) |
293 | 293 | ); |
294 | 294 |
|
295 | 295 | $style['rowA'] = |
296 | 296 | array('borders' => |
297 | 297 | array( |
298 | 298 | 'outline' => |
299 | | - array('style' => PHPExcel_Style_Border::BORDER_THIN), |
| 299 | + array('style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN), |
300 | 300 | 'vertical' => |
301 | | - array('style' => PHPExcel_Style_Border::BORDER_THIN)), |
302 | | - 'fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID, |
| 301 | + array('style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN)), |
| 302 | + 'fill' => array('type' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID, |
303 | 303 | 'startcolor' => array( 'argb' => 'FFFFFFFF')) |
304 | 304 | ); |
305 | 305 |
|
306 | 306 | $style['rowB'] = |
307 | 307 | array('borders' => |
308 | 308 | array( |
309 | 309 | 'outline' => |
310 | | - array('style' => PHPExcel_Style_Border::BORDER_THIN), |
| 310 | + array('style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN), |
311 | 311 | 'vertical' => |
312 | | - array('style' => PHPExcel_Style_Border::BORDER_THIN)), |
313 | | - 'fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID, |
| 312 | + array('style' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN)), |
| 313 | + 'fill' => array('type' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID, |
314 | 314 | 'startcolor' => array( 'argb' => 'DCDCDCDC')) |
315 | 315 | ); |
316 | 316 |
|
|
0 commit comments