ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Web Query with a twist (https://www.excelbanter.com/excel-programming/321194-web-query-twist.html)

JOSII

Web Query with a twist
 
Question: If a web site requires a password, and the web page you need to
query requires navigation, can Excel be automated to accomplish this???

I have successfully queried the web page in question after a manual login,
and then, minutes later, requeried the same page. However, after an hour or
so goes by, the requery fails and a manual login is required again.

Is there way to program a query from Excel that will accomplish this?
Thanks for the input!

Nate Oliver[_3_]

Web Query with a twist
 
Hello,

There might be another, perhaps more straightforward, way to do this, but
you might able to control IE with automation. Here's an example of logging
into a website:

http://mrexcel.com/board2/viewtopic.php?t=101460

The last post in that thread tells you the library references you're working
with at this point in the event you prefer to use an early bind.

You'd need to look at the html source code to determine the controls you
want to manipulate.

And here are a couple of examples of 'scraping text' from an html document
http://groups-beta.google.com/group/...6f43d5aba9353d
http://www.mrexcel.com/board2/viewtopic.php?t=75432

Since you already have control of the object, no need to use GetObject, work
with 'ie' like in the 2nd example.

Regards,
Nate Oliver

JOSII

Web Query with a twist
 
Thanks Nate! I haven't tried to automate IE yet. I'm just now learning the
ins and outs of Excel and Access VBA. I noted the url in the macro when I
used the web query, and it looked like:

"https://www.mycompany.com/members/details.asp?id=44465"

The tag would occasionally change the id from 44465 to another group of five
digits. That was apparently enough to throw off the code.

I'll check out the web site you referenced for more info. Thanks for your
help!

"Nate Oliver" wrote:

Hello,

There might be another, perhaps more straightforward, way to do this, but
you might able to control IE with automation. Here's an example of logging
into a website:

http://mrexcel.com/board2/viewtopic.php?t=101460

The last post in that thread tells you the library references you're working
with at this point in the event you prefer to use an early bind.

You'd need to look at the html source code to determine the controls you
want to manipulate.

And here are a couple of examples of 'scraping text' from an html document:
http://groups-beta.google.com/group/...6f43d5aba9353d
http://www.mrexcel.com/board2/viewtopic.php?t=75432

Since you already have control of the object, no need to use GetObject, work
with 'ie' like in the 2nd example.

Regards,
Nate Oliver



All times are GMT +1. The time now is 05:37 PM.

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