diff --git a/dist/insurance.php b/dist/insurance.php index 7736bfb..4d4b680 100644 --- a/dist/insurance.php +++ b/dist/insurance.php @@ -187,8 +187,10 @@ foreach ($rows as $r) { $sheet->getStyle($cell($c, $rowIdx))->getNumberFormat()->setFormatCode('#,##0.00 [$€-de-DE]'); $c++; - // Seriennummer - $sheet->setCellValue($cell($c++, $rowIdx), $r['serial_no']); + // Seriennummer (immer als Text, damit Excel rein numerische Werte nicht als Zahl interpretiert) + $sheet->getStyle($cell($c, $rowIdx))->getNumberFormat()->setFormatCode('@'); + $sheet->setCellValueExplicit($cell($c, $rowIdx), $r['serial_no'], DataType::TYPE_STRING); + $c++; // Anschaffung (Datum) $excelDate = '';