Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to import one section of data from internet?
Using web query, how do i create a macro that will only import a sectio
of the web instead of the entire page. For example, I need to impor only the current stock data's high, low, close (FEB27) into m spreadsheet. Thanks Here is my code. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("C3")) Is Nothing Then Exit Sub Else Dim CoSym As String CoSym = Worksheets("Main").Range("C3").Value With Sheets("Stock 1").QueryTables(1) .Connection = _ "URL;http://table.finance.yahoo.com/k?s=" & CoSym .WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingAll .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = True .WebDisableDateRecognition = False .WebDisableRedirections = True .Refresh BackgroundQuery:=False End With End If End Su -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to import one section of data from internet?
Which version of Excel are you using? I am using v. 2003, when I want to
import a web page, there are arrows at the top left hand corner of each table. By checking those arrows, I can easily choose to import the entire page or just sections of I want. "qitrader888 " wrote in message ... Using web query, how do i create a macro that will only import a section of the web instead of the entire page. For example, I need to import only the current stock data's high, low, close (FEB27) into my spreadsheet. Thanks Here is my code. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("C3")) Is Nothing Then Exit Sub Else Dim CoSym As String CoSym = Worksheets("Main").Range("C3").Value With Sheets("Stock 1").QueryTables(1) Connection = _ "URL;http://table.finance.yahoo.com/k?s=" & CoSym WebSelectionType = xlEntirePage WebFormatting = xlWebFormattingAll WebPreFormattedTextToColumns = True WebConsecutiveDelimitersAsOne = True WebSingleBlockTextImport = True WebDisableDateRecognition = False WebDisableRedirections = True Refresh BackgroundQuery:=False End With End If End Sub --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to import one section of data from internet?
I'm running Excel 2003. I want to gather specific data from that box. I
my case, it would be to only gather the most current information -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I set up a macro to clear data from a section? | Excel Discussion (Misc queries) | |||
Import data from zip file through Internet | Excel Discussion (Misc queries) | |||
How to import data from a zipped file through Internet? | Excel Discussion (Misc queries) | |||
Capture cross-section data | Excel Discussion (Misc queries) | |||
autofill formula to every section of data | Excel Discussion (Misc queries) |