Function writefile()
GetURL = "http://fr.weather.com/weather/local/FRXX0071" Dim Http
Set Http = CreateObject("Microsoft.XMLhttp" )
Http.Open "GET",GetURL,False
Http.Send
HtmlResult = Http.ResponseText
Set Http = Nothing
set fs=CreateObject("Scripting.FileSystemObject" )
set f=fs.CreateTextFile("weather.txt",true)
'j'extrait juste une ligne a probleme
tab=split(HtmlResult,vbcrlf)
HtmlResult=tab(14)
msgbox(HtmlResult)
f.write(HtmlResult)
f.close
set f=nothing
set fs=nothing
writefile = "Tempfile written"
End Function
|