fix some old php spreadsheet consts

This commit is contained in:
Uwe Steinmann 2023-04-18 09:40:50 +02:00
parent e14bfd9326
commit 55c7a32a05

View File

@ -128,8 +128,8 @@ class SeedDMS_Download_Mgr {
} }
$tcol = $col; $tcol = $col;
$sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName); $sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName);
$sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? PHPExcel_Shared_Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->setCellValueByColumnAndRow($tcol, $l, ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null);
$sheet->getStyleByColumnAndRow($tcol++, $l)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22); $sheet->getStyleByColumnAndRow($tcol++, $l)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
$sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']); $sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']);
$sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"])); $sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"]));
$l++; $l++;
@ -159,8 +159,8 @@ class SeedDMS_Download_Mgr {
} }
$tcol = $col; $tcol = $col;
$sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName); $sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName);
$sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ?PHPExcel_Shared_Date::PHPToExcel(new DateTime($r['date'])) : null); $sheet->setCellValueByColumnAndRow($tcol, $k, ($r['status']==1 || $r['status']==-1) ? \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(new DateTime($r['date'])) : null);
$sheet->getStyleByColumnAndRow($tcol++, $k)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22); $sheet->getStyleByColumnAndRow($tcol++, $k)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);
$sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']); $sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']);
$sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"])); $sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"]));
$k++; $k++;