diff --git a/src/FastExcelWriter/Sheet.php b/src/FastExcelWriter/Sheet.php index 90168e5..59ccb47 100644 --- a/src/FastExcelWriter/Sheet.php +++ b/src/FastExcelWriter/Sheet.php @@ -737,6 +737,8 @@ public function setColWidth($col, $width, ?bool $min = false): Sheet } elseif (empty($this->colMinWidths[$colIdx]) || $this->colMinWidths[$colIdx] <= $width) { $this->colAttributes[$colIdx]['width'] = $width; + $this->colAttributes[$colIdx]['min'] = $colIdx + 1; + $this->colAttributes[$colIdx]['max'] = $colIdx + 1; } } }