这个网站并不能自定义页记录的访问,故你可以自己在Excel里写宏来批处理下载,然后再通过定义序号-排序-删除不需要的记录后重排即可。 Sub Macro1(acPage, acCell)
'
' Marco 记录的宏 2005-3-30
' '
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.stocklines.net/jytop/index.asp?type=stock&page=" & acPage, Destination:= _
Range(acCell))
.Name = "index.asp?type=stock"
.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 = "11"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub Sub DownNTData()
'Sub DownNTData(stPage, EndPage)
Dim i As Integer
Dim acCell As String
'For i = stPage To EndPage
For i = 1 To 34
ActiveCell.SpecialCells(xlLastCell).Select
acCell = "A" & ActiveCell.Row + 1
Call Macro1(i, acCell)
Next i
End Sub |