Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[aide svp] URL variables dans ActiveSheet.QueryTables

2 réponses
Avatar
Albert
Bonjour,

En cellule B1 de l'onglet "Liste_jour" j'ai une url (http:....).
J'essaye de télecharger les données de cette adresse (en fait j'ai plusieurs
dizaines de liens à explorer) mais je suis bloqué.

L'erreur se trouve à mon avis dans le passage suivant mais je n'arrive pas à
trouver la bonne syntaxe:

" With ActiveSheet.QueryTables.Add(Connection:="URL;" &
Sheets("liste_jour").Range("B1"), Destination:=Range("A1")) "


Merci d'avance pour votre aide ;-)
Albert


Sheets("download_zone").Select
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:="URL;" &
Sheets("liste_jour").Range("B1"), Destination:=Range("A1"))
.Name = "ok"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

2 réponses

Avatar
h2so4
bonsoir,


essaie ceci


With ActiveSheet.QueryTables.Add(Connection:= "URL;" _
& Sheets("liste_jour").Range("B1"),Destination:=Range("A1"))

--

h2so4
play triogical at http://www.triogical.com
"Albert" wrote in message
news:460157eb$0$5888$
Bonjour,

En cellule B1 de l'onglet "Liste_jour" j'ai une url (http:....).
J'essaye de télecharger les données de cette adresse (en fait j'ai
plusieurs dizaines de liens à explorer) mais je suis bloqué.

L'erreur se trouve à mon avis dans le passage suivant mais je n'arrive pas
à trouver la bonne syntaxe:

" With ActiveSheet.QueryTables.Add(Connection:="URL;" &
Sheets("liste_jour").Range("B1"), Destination:=Range("A1")) "


Merci d'avance pour votre aide ;-)
Albert


Sheets("download_zone").Select
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:="URL;" &
Sheets("liste_jour").Range("B1"), Destination:=Range("A1"))
.Name = "ok"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:úlse
End With



Avatar
Albert
Bonsoir,

essaie ceci


With ActiveSheet.QueryTables.Add(Connection:= "URL;" _
& Sheets("liste_jour").Range("B1"),Destination:=Range("A1"))


Merci pour ton aide. J'ai compris ou je me trompais : l'addresse que je
rentrais est differente de l'adresse qu' Excel récupérait!

Merci bien et bonne nuit ;)
Al