Un aide sur importation donneé JSON
s
Bonjour à toutes et a tous,
Voilà j'aimerais importer des données depuis un fichier JSON mais je me suis bloquer sur une partie de ce JSON
tous dans fichier joint
juste je cherche a compléter l importation
Merci de vôtre aide
Sub Feuil1()
Dim ScriptControl As Object, PMU As Object
Dim Ecurie As Object, Cheval As Object, Rb As Object, Gp As Object, N As Object, couru As Object
Dim Site As String, i As Long
Dim JsonObject As Object
Set ScriptControl = CreateObject("MSScriptControl.ScriptControl")
ScriptControl.Language = "JScript"
Site = "" & [D1] & "/R" & [F1] & "/C" & [H1] & ""
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", Site, False
.send
Set PMU = ScriptControl.Eval("(" + .responsetext + ")")
.abort
End With
Range("A12:p280").Select
Selection.ClearContents
i = 12
Set Ecurie = PMU.participants
On Error Resume Next
For Each Cheval In Ecurie
With ActiveSheet
For Each Gp In Cheval.coursesCourues
Set couru = Gp.participants
Set Gp.Date = x
For Each Rb In couru
.Cells(i, 2).Value = Cheval.numPmu
.Cells(i, 3).Value = Cheval.nomCheval
.Cells(i, 4).Value = Gp.Date / 1000 / 60
.Cells(i, 5).Value = Gp.timezoneOffset
.Cells(i, 6).Value = Gp.hippodrome
.Cells(i, 7).Value = Gp.nomPrix
.Cells(i, 8).Value = Gp.discipline
.Cells(i, 9).Value = Gp.allocation
.Cells(i, 10).Value = Gp.distance
.Cells(i, 11).Value = Gp.nbParticipants
.Cells(i, 12).Value = Gp.tempsDuPremier
.Cells(i, 13).Value = Rb.numPmu
.Cells(i, 14).Value = Rb.place.place ' juste ici que trouve pas comment faire
.Cells(i, 15).Value = Rb.nomCheval
.Cells(i, 16).Value = Rb.nomJockey
Next
i = i + 1
Next
End With
Next Cheval
Set couru = Nothing
Set GT = Nothing
Set Rb = Nothing
Set Gp = Nothing
Set Ecurie = Nothing
Set PMU = Nothing
Set ScriptControl = Nothing
routineJSON JsonObject, 1
End Sub
<br>