WEB Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
i import data from a web site using web query, but the URL changes
manytimes. the adress contains date and version "let say:
http://blablabla_yyyymmdd_v12.0.htm". if anyone has an idea how to loop
trought the adress to check for the last version for each date. thanks
 
thak you Don!
the question is how to know what is the last version in the adtress is it
V12, V13.....it starts at V1 and there are around 16 Versions a day
the URL:"http://blablabla_"&mynewdate&"_v " & VersionNumber & ".0.htm"
 
It depends on what you are trying to do. I can't tell without an actual
sample with the real url. Perhaps a for i to 22 and stop if you find it.
 
thanks Don,
here the real URL:
"URL;ftp://aftp.ieso.ca/pub/reports/PUB/SAADaily/PUB_SAADaily_20070512_v11.0.htm",
its a version 11 may be they gonna be 20 at the end of the day

thanks again
 
Don,
waht i wanna do is :

private sub lastversion()
dim number as interger
number =1
do while
dir"URL;ftp://aftp.ieso.ca/pub/reports/PUB/SAADaily/PUB_SAADaily_20070512_vnumber.0.htm")<>""
number=number+1
loop
lastversion = number
end sub

i know that the funtion dir is wrong thats what i'm looking for.
(something like dir or something wich gonna help me to test if url exists or
not)
thanks again
 
I'm still not sure why you need to know which is the last version. They
don't appear to change. I did try working backwards from 20 until I got a
hit on the web fetch. so maybe ??? something like this. I would need to try
it.

for i=20 to 1 step -1
on error resume next
if get a hit msgbox i (would give the last available version)??
next i
????
 
I want that the macro will look for the version number (the last one) and put
it in the URL adress (because the URL adress contains that number its after
teh
date)"URL;ftp://aftp.ieso.ca/pub/reports/PUB/SAADaily/PUB_SAADaily_20070512_Vnumber.0.htm".
thats why i need to know wich is the last number ( to put it in the URL
adress)

thanks again Don
 
As I said, the only way I can think of to do this is to actually do the web
fetch starting with 20 and working backwards until it gets a hit.
Give me your email and I will send a workbook that stops the last one at
version 13.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top