public static function setAutoSize($colAlphaStart=NULL, $colAlphaEnd=NULL, $value=true)
    {
        $sheetObj = self::validSheetObj();

        $colStart = ($colAlphaStart) ? self::alpha2num($colAlphaStart) : self::$_offsetCol + 1;
        $colEnd = ($colAlphaEnd) 
            ? self::alpha2num($colAlphaEnd) 
            : self::alpha2num($sheetObj->getHighestColumn());

        foreach (range($colStart,$colEnd ) as $key => $colNum) {
            $sheetObj->getColumnDimension(self::num2alpha($colNum))->setAutoSize($value);
        }

        return new static();
    }
public static function setAutoSize($colAlphaStart=NULL, $colAlphaEnd=NULL, $value=true)
    {
        $sheetObj = self::validSheetObj();

        $colStart = ($colAlphaStart) ? self::alpha2num($colAlphaStart) : self::$_offsetCol + 1;
        $colEnd = ($colAlphaEnd) 
            ? self::alpha2num($colAlphaEnd) 
            : self::alpha2num($sheetObj->getHighestColumn());

        foreach (range($colStart,$colEnd ) as $key => $colNum) {
            $sheetObj->getColumnDimension(self::num2alpha($colNum))->setAutoSize($value);
        }

        return new static();
    }
public static function setAutoSize ( $ colAlphaStart = NULL , $ colAlphaEnd = NULL , $ value = true ) { $ sheetObj = self :: validSheetObj ( ) ; $ colStart = ( $ colAlphaStart ) ? self :: alpha2num ( $ colAlphaStart ) : self :: $ _offsetCol + 1 ; $ colEnd = ( $ colAlphaEnd ) ? self :: alpha2num ( $ colAlphaEnd ) : self :: alpha2num ( $ sheetObj -> getHighestColumn ( ) ) ; foreach ( range ( $ colStart , $ colEnd ) as $ key => $ colNum ) { $ sheetObj -> getColumnDimension ( self :: num2alpha ( $ colNum ) ) -> setAutoSize ( $ value ) ; } return new static ( ) ; }
Set AutoSize for all actived cells or set by giving column range to the actived sheet

@param string $colAlphaStart Column Alpah of start
@param string $colAlphaEnd Column Alpah of end
@param bool $value PhpSpreadsheet AutoSize() argument
@return self
Set AutoSize for all actived cells or set by giving column range to the actived sheet