lancer une macro VBA excel à partir de SAS base
Bonjour,
Je voudrais automatiser mon traitement excel à partir de SAS. J'ai une macro qui se presente ainsi:
Code:
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| Sub test()
'
' test Macro
' Macro recorded 16/12/2009 by jaliouu
'
'
Range("A1").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("A2").Select
Columns("A:A").ColumnWidth = 13.29
Rows("1:1").RowHeight = 26.25
Range("A1").Select
Selection.Font.Bold = True
Range("C1").Select
ActiveCell.FormulaR1C1 = "STATISTICS on production of manufactured"
Range("C1:R1").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 14
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("C2").Select
ActiveCell.FormulaR1C1 = "To use the database"
Range("C2:R2").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Selection.Font.Underline = xlUnderlineStyleSingle
Range("A3").Select
ActiveCell.FormulaR1C1 = "PRODCOME code"
Range("B3").Select
ActiveCell.FormulaR1C1 = "UNIT"
Range("C3").Select
ActiveCell.FormulaR1C1 = "Flag EU27"
Range("C4").Select
Columns("C:C").ColumnWidth = 10
Range("D3").Select
ActiveCell.FormulaR1C1 = "flag eu25"
Range("E3").Select
ActiveCell.FormulaR1C1 = "value eu25"
Columns("F:F").Select
Range("F3").Activate
Columns("E:E").ColumnWidth = 9.71
Range("F3").Select
ActiveCell.FormulaR1C1 = "base EU25"
Range("G3").Select
ActiveCell.FormulaR1C1 = "Belgium"
Range("H3").Select
ActiveCell.FormulaR1C1 = "Bulgaria"
Range("H4").Select
ActiveCell.FormulaR1C1 = "ALL VALUE AND VOLUMES ARE"
Range("H5").Select
ActiveCell.FormulaR1C1 = "ALL CONFIDENTIEL DATA"
Range("H6").Select
ActiveCell.FormulaR1C1 = "(:C)=confidentiel, (:CE)=Confidentiel"
Range("H7").Select
End Sub |
Comment puis je faire pour l executer de SAS?
Merci