|
8#
楼主 |
发表于 2006-9-1 03:01:00
|
只看该作者
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.***.com/***/2005-2006/abc.html" _
, Destination:=Range("A1"))
.Name = "abc"
.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 = "6,7"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = True
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
这是录制宏得到的代码,请问,应该怎么样才能实现批量查询?或者是,让它自动运行,循环进行?
其中,网址里面的***可以是任意字符,abc为分类,如何实现每个分类按照年份先后提取数据? |
|