Hello I have this code where i create an xlsx file and i need to pre set the width of the xlsx sheet cells. The actual problem is that when i open the excell i need to double c
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();