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 33 34 35 36 37 38 39 40
|
Sub Export_Excel()
Dim xlFicName As String
Application.Interactive = False
' Sauvegarde en XLS
xlFicName = ThisDocument.Path + "\" + ThisDocument.Name + ".xls"
ThisDocument.SaveAs xlFicName
' Ouverture fichier
Set xlapp = New Excel.Application
xlapp.Workbooks.Open xlFicName
' Formatage des restitutions
xlapp.Sheets(1).Select
RotationTexte 1, 6, 180
'FormatCentreDroit 1, "B11:F11"
GroupementVertical 1, 6
RéduireTailleTableau 1
ElargirColones 1, "A:AF", 5
xlapp.Windows(1).DisplayGridlines = False
' Formatage des restitutions
xlapp.Sheets(2).Select
RotationTexte 2, 8, 180
'FormatCentreDroit 1, "B11:F11"
GroupementVertical 2, 8
RéduireTailleTableau 2
ElargirColones 2, "A:AF", 5
xlapp.Windows(1).DisplayGridlines = False
xlapp.ActiveWorkbook.Save
xlapp.Visible = True
xlapp.ActiveWorkbook.Close
xlapp.Quit
Set xlapp = Nothing
End Sub |
Partager