XLS Object
 
Syntax
 
XLS.AutoFitColumn [Col]
 
Description
This sub autosizes the witdh of the specified column.
 
Note: this method requires an numeric value for column definition. Also, please take notice that column numbering is one-based. Column "A" in Excel is referred to, using the numeric value 1 (one), Column "B" is numeric value 2 (two), "C" is 2 (three), etc...
 
 
Parameter
Description
Col
Integer, required. One-based numeric value representing the column of the active worksheet.
 
Range: 1 - 32767
 
See Also

Example
 
Sub Main
 
Dim strName As String
 
   If Not XLS.AppInit() Then Exit Sub
 
   XLS.AppVisible = True
 
   strName = XLS.AddWorkBook()
 
   XLS.AddWorkSheet "MijnBlad"
 
   XLS.SetValue 1,1,"Dit is een hele brede tekst"
 
   XLS.AutoFitColumn 1
 
   XLS.CloseWorkBook
 
   XLS.AppClose
 
End Sub