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