业余爱好者一个,写了个代码,将就用吧.别忘记了我的论坛币.
Private Sub CommandButton1_Click()
Dim A, B, C As Date, i As Integer, D, E, F As Variant
On Error Resume Next
A = #5/31/2005#
B = #12/31/2009#
For i = 0 To 1675
C = A + i
D = Format(C, "YYYYMMDD")
With ActiveSheet.QueryTables.Add(Connection:="URL;
http://www.czce.com.cn/portal/exchange/jyxx/hq/hq" & D & ".html", Destination:=Range("A1"))
.Name = " CF "
.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 = "3"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=0
ChDir "C:\Documents and Settings\Administrator\桌面\1"
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Administrator\桌面\1\" & D & ".xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Next i
End Sub