用Excel 开VBA编辑, 设一个按钮把以下程式码填进去
这样可以取得资料, 至于后续要怎么处理, 就看个人了~
复制程式
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;[url]http://tw.stock.yahoo.com/q/q?s=2350"[/url], Destination:=Range("A1"))
.Name = "q?s=2350"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With