Help bringing in hyperlink into Excel from Web

E

eric

Hello

I am bringing in data from the web using a macro (see below). The data fro
th
webpage gets imported correctly, however in an internet browser, one of th
columns has text with an underlying hyperlink, and I am hoping someone ca
hel
me bring that hyperlink instead of the text into Excel

For example, http://finance.yahoo.com/q?s=AAPL&ql=1 has links to many page
including "Order Book", but I would wan
"http://finance.yahoo.com/q/ecn?s=AAPL+Order+Book" to be brought int
Excel

Thank you so much!

My macro

With ActiveSheet.QueryTables.Add(Connection:=
"URL;https://www.XYZ....",
Destination:=Range("$A$1")
.Name = "Import
.FieldNames = Tru
.RowNumbers = Fals
.FillAdjacentFormulas = Fals
.PreserveFormatting = Tru
.RefreshOnFileOpen = Fals
.BackgroundQuery = Tru
.RefreshStyle = xlInsertDeleteCell
.SavePassword = Fals
.SaveData = Tru
.AdjustColumnWidth = Tru
.RefreshPeriod =
.WebSelectionType = xlEntirePag
.WebFormatting = xlWebFormattingNon
.WebPreFormattedTextToColumns = Tru
.WebConsecutiveDelimitersAsOne = Tru
.WebSingleBlockTextImport = Fals
.WebDisableDateRecognition = Fals
.WebDisableRedirections = Fals
.Refresh BackgroundQuery:=Fals
End With
 
D

Don Guillett

Hello,

 I am bringing in data from the web using a macro (see below). The datafrom
the
 webpage gets imported correctly, however in an internet browser, one of the
 columns has text with an underlying hyperlink, and I am hoping someonecan
help
 me bring that hyperlink instead of the text into Excel.

 For example,http://finance.yahoo.com/q?s=AAPL&ql=1has links to many pages
 including "Order Book", but I would want
 "http://finance.yahoo.com/q/ecn?s=AAPL+Order+Book" to be brought into
 Excel.

 Thank you so much!!

 My macro:

 With ActiveSheet.QueryTables.Add(Connection:= _
 "URL;https://www.XYZ....", _
 Destination:=Range("$A$1"))
 .Name = "Import"
 .FieldNames = True
 .RowNumbers = False
 .FillAdjacentFormulas = False
 .PreserveFormatting = True
 .RefreshOnFileOpen = False
 .BackgroundQuery = True
 .RefreshStyle = xlInsertDeleteCells
 .SavePassword = False
 .SaveData = True
 .AdjustColumnWidth = True
 .RefreshPeriod = 0
 .WebSelectionType = xlEntirePage
 .WebFormatting = xlWebFormattingNone
 .WebPreFormattedTextToColumns = True
 .WebConsecutiveDelimitersAsOne = True
 .WebSingleBlockTextImport = False
 .WebDisableDateRecognition = False
 .WebDisableRedirections = False
 .Refresh BackgroundQuery:=False
 End With

This type query is one that I am very familiar with but Idon't
understand what you want from the
http://finance.yahoo.com/q/ecn?s=AAPL+Order+Book
url?? This is what is returned at 7:11 am TEXAS time
BTW, you should establish your fetch and then just refresh with
different variables instead of creating a NEW fetch each time.

Apple Inc.(RT-BATS: AAPL)
Last Trade: N/A
Trade Time: N/A
Change: N/A
Bid: N/A
Ask: N/A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top