How to set XLSX cell width with EPPlus?

I find that setting the column widths after I have filled in all the data on the sheet works: ws.Column(1).Width = 50; There is also the autoFitColumns method but this ignores cells with formulas and wrapped text so it did not work for me. ws.Cells[“A1:K20”].AutoFitColumns();

Auto column width in EPPlus

Use AutoFitColumns, but you have to specify the cells, i assume the entire worksheet: VB.NET Worksheet.Cells(Worksheet.Dimension.Address).AutoFitColumns() C# Worksheet.Cells[Worksheet.Dimension.Address].AutoFitColumns(); Please note you need to call this method after filling the worksheet.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)