1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Sub creer_tableau(nom_fichier As String)
Dim excl As New excel.Application
Dim classeur As New excel.Workbook
Dim feuille As New excel.Worksheet
Set classeur = excl.WorkBooks.Add
excl.Visible = True
construire_tableau feuille, excl, classeur
classeur.SaveAs nom_fichier
Set classeur = Nothing
classeur.Close
excl.Quit
Set excl = Nothing
End Sub
Sub construire_tableau(feuille As excel.Worksheet, excl As excel.Application, classeur As excel.Workbook)
ActiveCell.FormulaR1C1 = "Titre"
Range("A3").Select
ActiveCell.Value = "Numéro"
Range("B3").Select
ActiveCell.Value = "Terme Fr"
Range("C3").Select
ActiveCell.Value = "Cat. Gram."
... |
Partager