SUB Shanghai Stock Exchange stock History monthly deal Overview () on Error Resume Next cells.clear [A1:aa1] = Array ("name", "Code", "Month", "opening market at the beginning of the month", "End of month closing price", "deal The highest price "," Time "," lowest price of the transaction "," Time "," monthly total volume (million shares) "," Maximum "," Time "," minimum "," Time "," Monthly rollup amount (million yuan) "," Maximum "," Time "," minimum "," Time "," Total number of transactions (million pen) "," turnover rate ", "End-of-month average P/E", "percent change", "Amplitude%", "end-of-month market value", "month-end liquidity", "cumulative trading day of the Month") arr = Array ("ProductName", "id", "txdate", "Openprice", "Clos Eprice "," Maxhighprice "," Maxhighpricedate "," Minlowprice "," Minlowpricedate "," Totalvol "," Maxtrvol "," MaxTrVolDate " , "Mintrvol", "Mintrvoldate", "Totalamt", "Maxtramt", "Maxtramtdate", "Mintramt", "Mintramtdate", "Totaltx", " Totalexchrate "," closeprofitrate "," Change "," Totalchange "," Closemarketvalue "," Closenegovalue "," Totaltxdate ") Set J s = CreateObject ("Msscriptcontrol.scriptcontrol") JS. Language = "JavaScript" with CreateObject ("winhttp.winhttprequest.5.1"). Open "GET", "http://query.sse.com.cn/security/fund/querymonthquat.do?jsoncallback=a&productid=600765& Inyear=2014&prodtype=1&pagehelP.pagesize=20&_= "& Js.eval (" Math.Round (New Date (). GetTime ()) "), True. setRequestHeader" X-httpwatch-rid ", "11777-10185". setRequestHeader "Referer", "http://www.sse.com.cn/assortment/stock/list/stockdetails/turnover/ Turnovermonth_index.shtml? company_code=600765&inyear=2014 ". setRequestHeader" Connection "," keep-alive ". Send T1 = Timer Do Until Timer > T1 + 2 DoEvents Loop TT = replace (replace (. ResponseText, "(", "="), ")", "") JS. Addcode Replace (replace (. ResponseText, "(", "="), ")", "") n = js.eval ("A.result.length") for i = 0 to N-1 For j = 0 to + Cells (i + 2, j + 1) = Js.eval ("a.result[" & I & "]." & Arr (j)) Next J Next i End WithEnd Sub
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
EXCEL_VBA Shanghai Stock Exchange stock History of the monthly deal overview