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
|
...
DemandeFichier.send "sEcho=5&iColumns=7&sColumns=&iDisplayStart=40&iDisplayLength=20&i...
str_demande_fich = DemandeFichier.responseText
if len(str_demande_fich)=0 then Ag = True: msgbox("Erreur script n°2") 'ne marche pas car len<>0!!!
resultat = Replace(DemandeFichier.responseText, "[", vbCrLf)
tablo = Split(resultat, vbCrLf)
Z = 0
For i = 2 To UBound(tablo)
tablo2(Z, 0) = Split(Split(tablo(i), "\u003e")(1), "\")(0)
reponse = reponse & tablo2(Z, 0)
tablo(i) = Split(Split(tablo(i), "/div\u003e"",""")(1), "]")(0)
tablo2(Z, 1) = Split(tablo(i), """,""")(0)
reponse = reponse & chr(9) & tablo2(Z, 1)
tablo2(Z, 2) = Split(tablo(i), """,""")(1)
reponse = reponse & chr(9) & tablo2(Z, 2)
tablo2(Z, 3) = Split(tablo(i), """,""")(2)
reponse = reponse & chr(9) & tablo2(Z, 3)
tablo2(Z, 4) = Split(tablo(i), """,""")(3)
reponse = reponse & chr(9) & tablo2(Z, 4)
tablo2(Z, 6) = Replace(Split(tablo(i), """,""")(5), Chr(34),"")
reponse = reponse & chr(9) & tablo2(Z, 6)
On Error Resume Next
tablo2(Z, 5) = Split(Split(tablo(i), "\u003e")(1), "\")(0)
reponse = reponse & chr(9) & tablo2(Z, 5) & vbcrlf
Err.Clear
Z = Z + 1
Next
reponse = reponse & vbcrlf & str_demande_fich
GetObject(, "Excel.Application").Workb....
Set FSys = CreateObject("Scripting.FileSystemObject")
Set MonFic = FSys.CreateTextFile("C:\response\response2.txt") 'permet de vérifier le script si défaut en allant le voir
With MonFic
.write reponse
End With |
Partager