OfficeOpenXml.ExcelColumn.AutoFit C# (CSharp) Method

AutoFit() public method

Set the column width from the content of the range. The minimum width is the value of the ExcelWorksheet.defaultColumnWidth property. Note: Cells containing formulas are ignored since EPPlus don't have a calculation engine. Wraped and merged cells are also ignored.
public AutoFit ( ) : void
return void
        public void AutoFit()
        {
            _worksheet.Cells[1, _columnMin, ExcelPackage.MaxRows, _columnMax].AutoFitColumns();
        }

Same methods

ExcelColumn::AutoFit ( double MinimumWidth ) : void