diff --git a/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php b/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php index 9d77a6b..66a13d6 100644 --- a/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php +++ b/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php @@ -122,7 +122,7 @@ class StyleRegistry extends \Box\Spout\Writer\Common\Manager\Style\StyleRegistry $this->styleIdToNumberFormatMappingTable[$styleId] = $registeredFormatId; } else { $this->registeredNumberFormats[$serializedFormat] = $styleId; - $this->styleIdToNumberFormatMappingTable[$styleId] = $this->fillIndex++; + $this->styleIdToNumberFormatMappingTable[$styleId] = count($this->registeredNumberFormats); } } else { // The fillId maps a style to a fill declaration