- ©«¤l
- 219
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-4-18
- ³Ì«áµn¿ý
- 2022-2-7
|
¦^´_ 5# pupai
¸Õ¸Õ- Sub CSV¤U¸ü()
- Dim path As String
- path = "C:\"
- ¤é´Á = "20141215"
- Set XML = CreateObject("Microsoft.XMLHTTP")
- Set stream = CreateObject("ADODB.stream")
-
- URL = "http://www.taifex.com.tw/chinese/3/7_12_8dl.asp?syear=" & VBA.Left(¤é´Á, 4) & "&smonth=" & VBA.Mid(¤é´Á, 5, 2) & "&sday=" & _
- VBA.Right(¤é´Á, 2) & "&eyear=" & VBA.Left(¤é´Á, 4) & "&emonth=" & VBA.Mid(¤é´Á, 5, 2) & "&eday=" & VBA.Right(¤é´Á, 2)
- XML.Open "GET", URL, 0
- XML.send
- With stream
- .Type = 1
- .Open
- .write XML.responseBody
- If Dir(path & "ÃþªÑ´Á³f" & ¤é´Á & ".csv") <> "" Then Kill (path & "ÃþªÑ´Á³f" & ¤é´Á & ".csv")
- .SaveToFile (path & "ÃþªÑ´Á³f" & ¤é´Á & ".csv")
- .Close
- End With
- End Sub
½Æ»s¥N½X |
|