3
I am working with the generation of spreadsheets in EXCEL, and for this I use the framework’s default api.
Imports Microsoft.Office.Interop.Excel
However, when I have a column with very long text, the line is broken to each word or according to the size of the header. I’d like to know how to make this more visually pleasurable. Is there any way to dynamically assign the width of excel columns, so that they are noticeably more pleasant?
I’m trying to use autofit, but it doesn’t seem to have the desired effect.
xlWorkSheet.Cells.Rows.AutoFit()
xlWorkSheet.Cells.Columns.AutoFit()
I already tried this command, but it did not work as I wanted. I managed to "solve" the problem by increasing the column title.
– Cleiton Ribeiro
@Cleitonribeiro this command only does not auto fit columns that have merged cells, would that be your case? I suggest you merge as little as possible, maybe just the title
– Math