Nader
02-09-2012, 09:18 PM
This code is to auto fit one column. but I have many columns so I'll write the same code many times, but this its not professional.
exlWorkSheet.Columns("a:a").EntireColumn.AutoFit()
I treid to insert loop to columns but I don't know how to do this.
For i As Integer = 0 To exlWorkSheet.Columns.Count - 1
exlWorkSheet.Columns(.......).EntireColumn.AutoFit()
Next
exlWorkSheet.Columns("a:a").EntireColumn.AutoFit()
I treid to insert loop to columns but I don't know how to do this.
For i As Integer = 0 To exlWorkSheet.Columns.Count - 1
exlWorkSheet.Columns(.......).EntireColumn.AutoFit()
Next