View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
feltra feltra is offline
external usenet poster
 
Posts: 24
Default Importing Web Page with Hyperlinks into Excel

Dear Dallman,

I don't know how to thank you!! I just had to try setting the "Full
HTML Formatting" and it works like a charm! Also verified that I
actually got the html links by checking outthis command in Immediate
window:
?ActiveCell.Hyperlinks(1).Address

and sure enough it displayed the URL from the downloaded table in the
sheet.

Ok, the reason I wanted this was to get (dump) the Quarterly,
HalfYearly and Annual Results from BSE (indian) exchange for each
listed company... Without this particular thing working, it was
looking like a case of "so near yet so far"... You can't imagine what
a relief it is to know that it is possible to get the links within the
sheet!

Thanks a lot & Best Regards,
-feltra

On Aug 5, 6:41 pm, Dallman Ross <dman@localhost. wrote:
On Sun, 05 Aug 2007 02:40:20 -0000 in microsoft.public.excel.misc,
feltra spake thusly:

I need to read a page from the web and import it in Excel,
programatically (ie. thru a macro). This page contains some text that
have hyperlinks...
I am open to experimenting with WebQuery or any other method,


WebQuery will work. I am using it now to import about 10
pages of data from my broker, including links that do work
from within Excel. This is with Excel 2002.

You should note that you'll want to jiggle with the Options
settings in the web query. When you're on the page when setting
up the query, up in the menu on the right is an Options area.
Click that and select, e.g., "Full HTML formatting". You
might also want to jiggle with the "Data / Import External Data /
Data Range Properties" settings. Note that you need to have a
cell or range from your imported query highlighted in order for
these data-edit features to be enabled.

You can auto-refresh the query -- that's what I do -- or you
can put it into a macro. I do that in another worksheet, as well.
There is a setting to get the macro to not pause and wait for your
confirmation click on the import. I found that after some
trial-and-error. But right this second I don't have that book
open and don't recall just what that trick was. Just knowing it's
possible might be enough help to get you going, though.

P.S. Sorry, I ran spell-check and accidentally corrected your
"experimenting" while I was at it, and now I can't see how you
originally had that word spelled before I go and post this. So
that word is not an accurate quote of your original text. :-)

--
dman