LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default retrieving data from a table on a website

Looks like a simple WebQuery will get it -

Sub QueryChemicalData()
Dim sUrl As String

' two parts to avoid line wrapping!
sUrl = "http://spreadsheets.google.com/pub?key="
sUrl = sUrl & "twQ35hFIq-y0N84xQ5l0ICQ&output=html"

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & sUrl _
, Destination:=Range("A1"))
.Name = "ChemicalData"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False ' << note default is 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
End Sub

' and to update -
Sub RefreshQ()
Dim qt As QueryTable

Set qt = ActiveSheet.QueryTables("ChemicalData")
'qt.BackgroundQuery = False
qt.Refresh

End Sub

Regards,
Peter T



"Roger on Excel" wrote in message
...
There is a internet page with chemical data :

http://spreadsheets.google.com/pub?k...CQ&output=html

It has chemicals in the first column and proerties in adjacent columns.

Is there a way to have a userform lookup a chemical in a textbox from the
websites 1st column and then populate other textboxes with the adjacent
data
from the table?

Can anyone help?

Thanks,

Roger



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with retrieving data from a table GRK Excel Worksheet Functions 4 June 23rd 09 06:07 PM
Retrieving data from a table John in PA Excel Discussion (Misc queries) 4 September 1st 07 10:17 PM
Retrieving data from another table or array .. sansk_23 Excel Worksheet Functions 1 October 26th 06 06:16 PM
Retrieving Exchange Rate Data from a Website PS Excel Programming 4 August 11th 05 11:13 PM
Retrieving Source Data From Pivot Table John Units Excel Programming 1 September 9th 03 08:07 PM


All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"