I'm working with the generation of spreadsheets in EXCEL, and for this I use the standard api of the framework.
Imports Microsoft.Office.Interop.Excel
However, when I have a column with very long text, the line is broken with each word or according to the size of the title of the header. I wonder how to make this more visually pleasing. Is there any way to dynamically assign the width of the excel columns so that they are visibly more pleasing?
I'm trying to use autofit, but it does not seem to have the desired effect.
xlWorkSheet.Cells.Rows.AutoFit()
xlWorkSheet.Cells.Columns.AutoFit()