|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
怎么修改只显示最新网站表格一期的数据,原有一程序如下:
Private Sub CommandButton1_Click()
Range("A3:AC3500").Clear
k3dshijihao = "http://www.17500.cn/getData/ssq.TXT"
d3s = "WData3D_All"
Cells(2, 1) = "开奖期号"
Cells(2, 2) = "开奖日期"
Cells(2, 3) = "红"
Cells(2, 4) = "号"
Cells(2, 5) = " "
Cells(2, 6) = " "
Cells(2, 7) = " "
Cells(2, 8) = " "
Cells(2, 9) = "蓝"
Cells(2, 10) = "红"
Cells(2, 11) = "号"
Cells(2, 12) = "出"
Cells(2, 13) = "球"
Cells(2, 14) = "顺"
Cells(2, 15) = "序"
Cells(2, 16) = "投注总额"
Cells(2, 17) = "奖池金额"
Cells(2, 18) = "一等注数"
Cells(2, 19) = "一等金额"
Cells(2, 20) = "二等注数"
Cells(2, 21) = "二等金额"
Cells(2, 22) = "三等注数"
Cells(2, 23) = "金额"
Cells(2, 24) = "四等注数"
Cells(2, 25) = "金额"
Cells(2, 26) = "五等注数"
Cells(2, 27) = "金额"
Cells(2, 28) = "六等注数"
Cells(2, 29) = "金额"
cz = k3dshijihao: czmc = d3s
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & cz, Destination:=Range("A3"))
.Name = czmc
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("A" & (Application.Count(Range("a1:a3000")))).Select
End
End Sub
运行的结果是:
我只想要最后一排的几个数据
怎么修改呢?
|
|