EXCEL_VBA Shanghai Stock Exchange stock History of the monthly deal overview

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.