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
|
'Creation du fichier iqy
Sheets("Feuil1").Select
Range("A1").Activate
ActiveCell.FormulaR1C1 = "WEB"
Range("A2").Activate
ActiveCell.FormulaR1C1 = "1"
Range("A3").Activate
ActiveCell.FormulaR1C1 = _
"http://xxxxxxxxx:xxx/xxxx/product/liste.php?leftmenu=product&type=0?log=admin&pass=pass"
Range("A1:A3").Select
ChDir "G:\"
ActiveWorkbook.SaveAs Filename:="G:\access.iqy", FileFormat:=xlTextMSDOS, _
CreateBackup:=False
'requete web avec fichier iqy
Sheets("Feuil2").Select
Range("B2").Select
Workbooks("access.iqy").Connections.AddFromFile "G:\access.iqy"
With ActiveSheet.QueryTables.Add(Connection:="FINDER;G:\access.iqy", _
Destination:=Range("$B$2"))
.Name = "access"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = False
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With |
Partager