View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
shockley shockley is offline
external usenet poster
 
Posts: 135
Default Is there a way to get a portion of a WEB

Is it possible to go to a WEB site and pull off just a section of the page
instead of the entire page?<

No way that I'm aware of (and there's lots I'm unaware of!), unless there is
a specific url reference for that piece of the page within the source code.
For example, images are stored separately and loaded dynamically when you
open a webpage (my primitive understanding). If you look at the source code
for the page (right click the page and choose "view source") or if you open
the page and make it into an object with VB and look at the object's
properties (using the "locals" window), you will see the url for the image.
If you go to that url you will get the image displayed in the browser and
nothing else.

I have never seen tables with their own URL--they are (again, my primitive
understanding) created dynamically (i.e., according to input that you key
into a web page) from a database and designed to display within a particular
format on a web page.

The way I used to deal with tables, is to remove the formatting, define the
range they will appear on the worksheet (i.e., search for key cells for the
beginning of the range and for the end of the range), and save the table as
a workbook. Nowadays I extract the data I want and put it in a database.
But in some cases I download the entire webpage first, and do the data
extraction later.

HTH,
Shockley




"Bob Benjamin" wrote in message
...
From your help I am now able to write in Excel VBA a SUB to get a WEB page
and search it for specific text.

Is it possible to go to a WEB site and pull off just a section of the page
instead of the entire page?

For example, if you go to the following TSE web site:


http://www.tse.ca/HttpController?Get...View =Detaile
dPrices&Language=en&QuoteSymbol_1=bce&x=3&y=6

Is it possible to retrieve the two tables called LAST TRADE and END OF DAY
DATA?
What would the VBA SUB look like?
Would Excel VBA retrieve the tables faster than the entire page?

As always, I look forward to your response.

Regards,
Bob