Skip to content

Commit fe901d1

Browse files
author
MarkBaker
committed
Read number formatting for Gnumeric... highlighted as not occurring when reading date values
1 parent 52071e9 commit fe901d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PhpSpreadsheet/Reader/Gnumeric.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,13 @@ public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Sp
331331
$cell = $cell == 'TRUE';
332332
}
333333
}
334+
334335
$this->spreadsheet->getActiveSheet()->getCell($column . $row)->setValueExplicit((string) $cell, $type);
336+
if (isset($cellAttributes->ValueFormat)) {
337+
$this->spreadsheet->getActiveSheet()->getCell($column . $row)
338+
->getStyle()->getNumberFormat()
339+
->setFormatCode((string) $cellAttributes->ValueFormat);
340+
}
335341
}
336342

337343
if ($sheet->Styles !== null) {

0 commit comments

Comments
 (0)