只保留开奖期号、开奖号码,请问老师如何修改?
Private Sub CommandButton1_Click()
Range("A3:Q9900").Clear
k3dshijihao = "http://data.17500.cn/pl5_asc.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) = "单注奖金"
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)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("A" & (Application.Count(Range("a1:a8000")))).Select
End
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub