excel - Get data out of a webpage with VBA -
I try to get some data from this webpage:
P> I have to put the entire table on the right site for every smartphone type and every contract type.
One time payment for the setting: Anschlusspreis
One time payment for the phone: Smartphone
Total amount: Gesamt
Monthly payment for: BasisPariz
Monthly payment for mobile phones: Smartphone-Zuzhlung
It is stored in all JavaScript part, which is a very large letter.
I'm trying to use Excel VBA:
sub-button 1_Click () 'Error in Error Günter Hülller Slow Object, as Object, Object Doc in form, RNG as an object, ticker in the form of a string, string set as quote, i.e. = CreateObject ("InternetExplorer.Application") i = 1 'application.StatusBar = "Loading your request. Please wait Do ... "Ie.navigate" http://www.vodafone.de/privat/handys-tablets-tarife/smartphone-tarife.html "'ie.navigate Ticker to DoEvents Loop ie .readyState = READYSTATE_COMPLETE set doc = ie.document bid = doc.getElementsByID ("connectionFeeVal") innerText cells (3, 3) .Value = Bid MsgBox ("Done") 'Errorhandler:'. Hey = 91 Then the MSBbox "error message" i.e. application. Quit and All
But it is constantly looping on "Dovent".
Is anyone's idea that why I else
thank you in advance.
Instead of using IE Automation you can also use an http request object:
set the dim oRequest object oRequest = CreateObject ("WinHttp.WinHttpRequest.5.1" as such) ORequest.Open "GET", "http://www.vodafone.de/privat/handys-tablets-tarife /smartphone-tarife.html "oRequest.Send MsgBox oRequest.ResponseText
It is fast and does not require many sources as solution with ISE
if You are a proxy server you can use something like this:
const HTTPREQUEST_PROXYSETTIN G_PROXY = 2 dim oRequest object set oRequest = CreateObject ("WinHttp.WinHttpRequest.5.1") oRequest.setProxy HTTPREQUEST_PROXYSETTING_PROXY, "http: //proxy.intern:8080" ORXQUEST. Open "", "http://www.vodafone.de/privat/handys-tablets-tarife/smartphone-tarife.html" oRequest.Send MsgBox oRequest.ResponseText
Definitely You adjust the proxy for your values
As you are here a German page is also interessted in a brief description in the German language. There is also explained how to pass the value of a form to the webserver that can be useful to you.
Comments
Post a Comment