bonjour,

je dois transformer une macro VBA sur EXCEL en une application JAVA web

quelqu'un peut m'aider a comprendre cette partie ?? surtout le début

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Sub IDG01_mac()
DoEvents
'
DbDSN = "DATA"
Dbdir = "C:\"
DbName = Dbdir + "IDG_DATA_BASE.mdb"
DbTable = Dbdir + "IDG_DATA_BASE"
SaveDir = Dbdir '"\\Station1\ALL_user\IDG_DATA\"
'
With ActiveSheet.QueryTables.Add(Connection:= _
        "ODBC;DSN=" & DbDSN & ";UID=;PWD=;APP=Microsoft Office 2003;WSID=POSTE-001;DATABASE=PGM_DATA" _
        , Destination:=Range("A2"))
        .CommandText = Array( _
        "SELECT A_IDG_Last.Pgm_Num, A_IDG_Last.Pgm_Date, A_" _
        , _
        "IDG_Last.Load_cc" & Chr(13) & " FROM PGM_DATA.dbo.A_IDG_Last A_IDG_Last ORDER BY Pgm_num " _
        )
        .Name = "Lancer la requête à partir de RMP_PGM_Data"
        .FieldNames = False
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = True
        .SaveData = True
        .AdjustColumnWidth = False
        .RefreshPeriod = 0
        .PreserveColumnInfo = True
        .Refresh BackgroundQuery:=False
    End With
    Columns("B:B").ColumnWidth = 7.83
    Columns("B:B").Select
    Columns("B:B").EntireColumn.AutoFit
 
    GoTo NoRequest
 
NoRequest: