From 937a91f687e0676f29bb27bc30ec72f6590434b8 Mon Sep 17 00:00:00 2001 From: willkensonh Date: Mon, 15 Oct 2018 14:29:29 +1100 Subject: [PATCH] killmenow --- src/Spout/Writer/XLSX/Manager/Style/StyleManager.php | 1 + src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php b/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php index 4a608ba..5a50476 100644 --- a/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php +++ b/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php @@ -77,6 +77,7 @@ EOD; $format = $style->getNumberFormat(); $content .= ''; } + $content .= ''; return $content; } diff --git a/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php b/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php index 66a13d6..4bf1d82 100644 --- a/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php +++ b/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php @@ -121,8 +121,10 @@ class StyleRegistry extends \Box\Spout\Writer\Common\Manager\Style\StyleRegistry $registeredFormatId = $this->styleIdToNumberFormatMappingTable[$registeredStyleId]; $this->styleIdToNumberFormatMappingTable[$styleId] = $registeredFormatId; } else { + $formatId = count($this->registeredNumberFormats); $this->registeredNumberFormats[$serializedFormat] = $styleId; - $this->styleIdToNumberFormatMappingTable[$styleId] = count($this->registeredNumberFormats); + $this->styleIdToNumberFormatMappingTable[$styleId] = $formatId; + $format->setId($formatId); } } else { // The fillId maps a style to a fill declaration