sub Shanghai-Shenzhen stock market attention () on error resume next cells. clear columns ("A: "). numberformatlocal = "@" cells (1, 1) = "code" cells (1, 2) = "name" cells (1, 3) = "follow the number of students (persons) "With Createobject (" WinHTTP. winhttprequest.5.1 "). open "get", "http://ddx.gubit.cn/js/stockCode.js", false. send S = bytestobstr (. responsebody, "gb2312") with Createobject ("scriptcontrol "). language = "jscript ". addcode s for I = 0. eval ("stockco Dearray. length ")-1 W =. eval ("stockcodearray [" & I & "] [0]") cells (I + 2, 1) =. eval ("stockcodearray [" & I & "] [0]") cells (I + 2, 2) =. eval ("stockcodearray [" & I & "] [1]") with Createobject ("WinHTTP. winhttprequest.5.1 "). open "get", "http://iguba.eastmoney.com/action.aspx? Callback = A = & Action = opopstock & code = "& W, false. setRequestHeader "connection", "keep-alive ". setRequestHeader "Referer", "http://guba.eastmoney.com/list,002463.html ". send T =. responsetext with Createobject ("scriptcontrol "). language = "jscript ". addcode T cells (I + 2, 3) =. eval (". data. following ") end with next I end with end withend subfunction bytestobstr (strbody, codebase) dim objstream set objstream = Createobject (" ADODB. stream ") with objstream. type = 1. mode = 3. open. write strbody. position = 0. type = 2. charset = codebase bytestobstr =. readtext end with objstream. close set objstream = nothingend function
Shanghai-Shenzhen stock market attention