Commit 885ef06b authored by Marc Egger's avatar Marc Egger
Browse files

fix: phpSpreadsheet throws exception that '' is not numeric

parent 00b02089
Pipeline #4101 failed with stages
in 5 minutes and 10 seconds
......@@ -137,6 +137,12 @@ class Excel {
$key=EXCEL_STRING;
}
// if type numeric is not a number replace wit '' or 'not a number'
if($key === EXCEL_NUMERIC && !is_numeric($value)) {
$value = (ctype_space($value) || $value === '') ? '' : 'not a number';
$key=EXCEL_STRING;
}
$spreadsheet->getActiveSheet()
->setCellValueExplicit(
$posColumn . $posRow,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment