1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Dim xlapp, classeur, feuille, Selection
Set xlapp = CreateObject("Excel.Application")
xlapp.Visible = false
alert(xlapp)
xlapp.DisplayAlerts = FALSE
Set classeur = xlapp.Workbooks.open("C:\........\*.xls")
Set feuille = classeur.ActiveSheet
Set Selection = feuille.Columns("D:D")
With Selection
.ColumnWidth = 80
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Set Selection = feuille.Columns("C:C")
With Selection
.ColumnWidth = 30
.WrapText = True
End With
Set Selection = feuille.Columns("A:A")
With Selection
.ColumnWidth = 10
.WrapText = True
End With
classeur.Save
classeur.Close 'quitte en sauvant
xlapp.quit
Set classeur = Nothing
Set xlapp = Nothing |
Partager