作者:绿色风
分类:
时间:2022-08-18
浏览:188
楼主 xmyjk |
Q:如何下载
A:- Option Explicit
- Sub GetData()
- Dim Xl As Object
- Dim tmp1() As String, tmp2() As String, arr() As String
- Dim i As Long, j As Long, n As Long
-
- n = Cells(1, 1).Value
- Set Xl = CreateObject("MiCROSOFT.XMLHTTP")
- Xl.Open "GET", "http://www.500wan.com/static/public/dlc/txt/opencode/45.txt", False
- Xl.setRequestHeader "content-type", "application/x-www-form-urlencoded"
- Xl.send ""
-
- tmp1() = Split(Xl.responseText, vbCrLf)
- ReDim tmp2(n - 1)
- ReDim arr(0 To n - 1, 0 To 1)
- For i = 0 To n - 1
- tmp2(i) = tmp1(n - 1 - i)
- arr(i, 0) = Replace(Split(tmp2(i), Chr(9))(1), ",", " ")
- arr(i, 1) = Replace(Split(tmp2(i), Chr(9))(2), ",", " ")
- Next
-
- Dim lFileNum As Integer
- lFileNum = FreeFile
- Open ThisWorkbook.Path & Application.PathSeparator & "re.txt" For Output As #lFileNum
- For j = 0 To n - 1
- Print #lFileNum, arr(j, 0) & " " & arr(j, 1)
- Next
- Close #lFileNum
- End Sub
test11.rar |
2楼 亡者天下 |
很好
过来学习一下 |
3楼 纵鹤擒龙水中月 |
学习一下 |
免责声明
有感于原ExcelTip.Net留存知识的价值及部分知识具有的时间限定性因素,
经与ExcelTip.Net站长Apolloh商议并征得其同意,
现将原属ExcelTip.Net的知识帖采集资料于本站点进行展示,
供有需要的人士查询使用,也慰缅曾经的论坛时代。
所示各个帖子的原作者如对版权有异议,
可与本人沟通提出,或于本站点留言,我们会尽快处理。
在此,感谢ExcelTip.Net站长Apolloh的支持,感谢本站点所有人**绿色风(QQ:79664738)**的支持与奉献,特此鸣谢!
------本人网名**KevinChengCW(QQ:1210618015)**原ExcelTip.Net总版主之一