返回

Excel专题问题已解决

◆ 微信扫描二维码分享
◆ 手机QQ扫描二维码,点击右上角···分享到QQ好友或QQ空间
请拨打电话:4008017500

更多 关闭

求助:换链接后,数据更新不了,帮忙看一下。

好彩矩阵

2022-11-12 22:11:05

Private Sub CommandButton1_Click()
    Range("a3:g8000").ClearContents
    Dim i, j, Arr
    Dim s() As String
    With CreateObject("MSXML2.XMLHTTP")
        .Open "GET", "http://data.17500.cn/3d_asc.txt", False
        .Send
        s = Split(.responseText, Chr(10))
    End With
    List = Array(0, 2, 3, 4, 5, 6, 7)
    ReDim Arr(1 To UBound(s), 1 To 8)
    For i = UBound(s) - 31 To UBound(s) - 1
        For j = 1 To 7
            Arr(i - UBound(s) + 31 + 1, j) = Split(s(i), " ")(List(j - 1))
        Next j
    Next i
    With Cells(3, 1).Resize(UBound(s), 7)
'        .ClearContents
        .Value = Arr
    End With
   
   Range("A" & (Application.Count(Range("a1:a8000")) - 12)).Select
   Range("A2").Select
   
Call del_name
End Sub

上一篇 下一篇

779

5