ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   getting data from web (https://www.excelbanter.com/excel-programming/444203-re-getting-data-web.html)

ron

getting data from web
 
Mark...Since you haven't provided the url, I'm not exactly sure what you're trying to do. But perhaps the following construction can achieve what you want in a much faster and more economical fashion than using the query method...Ron

Note: IE-Tools-Internet Options-Security-Internet-Custom Level-Miscellaneous-set "Access data sources across domains" to "Enable" to prevent "Access Denied" errors.

Sub Test()
my_url = "http://www.your_url.com"
Set my_obj = CreateObject("MSXML2.XMLHTTP")
my_obj.Open "GET", my_url, False
my_obj.send
my_var = my_obj.responsetext
Set my_obj = Nothing
' now you can use "instr" and "mid" to extract the information you
' want from the source code which is contained in my_var

End Sub

mp

getting data from web
 

"ron" wrote in message
...
Mark...Since you haven't provided the url, I'm not exactly sure what
you're trying to do. But perhaps the following construction can achieve
what you want in a much faster and more economical fashion than using the
query method...Ron

Note: IE-Tools-Internet Options-Security-Internet-Custom
Level-Miscellaneous-set "Access data sources across domains" to "Enable"
to prevent "Access Denied" errors.

Sub Test()
my_url = "http://www.your_url.com"
Set my_obj = CreateObject("MSXML2.XMLHTTP")
my_obj.Open "GET", my_url, False
my_obj.send
my_var = my_obj.responsetext
Set my_obj = Nothing
' now you can use "instr" and "mid" to extract the information you
' want from the source code which is contained in my_var

End Sub


cool, I'll play with that
Thanks
Mark



mp

getting data from web
 

"ron" wrote in message
...
Mark...Since you haven't provided the url, I'm not exactly sure what
you're trying to do. But perhaps the following construction can achieve
what you want in a much faster and more economical fashion than using the
query method...Ron

Note: IE-Tools-Internet Options-Security-Internet-Custom
Level-Miscellaneous-set "Access data sources across domains" to "Enable"
to prevent "Access Denied" errors.

Sub Test()
my_url = "http://www.your_url.com"
Set my_obj = CreateObject("MSXML2.XMLHTTP")
my_obj.Open "GET", my_url, False
my_obj.send
my_var = my_obj.responsetext
Set my_obj = Nothing
' now you can use "instr" and "mid" to extract the information you
' want from the source code which is contained in my_var

End Sub


Hey Ron,
I finally got around to trying that (got busy with other stuff)
it works great, thanks
fwiw the url is similar to
http://download.finance.yahoo.com/d/...&f=l1vhgd1rm4n

where the parts "....AAPL+EZCH+BIDU+ARUN+....." can be any series of stock
tickers
and the tags after &f= are any list of yahoo finance tags

see for more info
http://www.gummy-stuff.org/Yahoo-data.htm

thanks
mark




All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com