• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA FOR DOWNLOADING STOCK PRICE FROM www.nseindia.com

harishb63

New Member
sir there is excel file i am uploaded in drop box file with the link below


https://www.dropbox.com/s/rkj0409tdadu8hp/new.xlsm


in this excel the data is downloading from yahoo finance i want it to change to www.nseindia.com for more accuracy

in this even it is only for stock prices but i am looking for stock future prices with 90 days or 3 months data

for more details i have explained in excel file

in the first side of excel it is original excel who has uploaded in website

in the second side i have explained what i need with pitcher


thank you in ADVANCE

genenily i am very much need of this to save lot of time

this is used for further calculation


if any clarification or dought can mail me at

bm.harish@hotmail.com


THANK YOU ONCE AGAIN
 
Hi, harishb63!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


And about this question in particular...


As far as I could see at a first quick glance, in the procedure DownloadStockQuotes of module Module1 there is this line:

-----

Code:
qurl = "URL;http://table.finance.yahoo.com/table.csv?s=" + stockTicker + "&a=" + StartMonth + "&b=" + StartDay + "&c=" + StartYear + "&d=" + EndMonth + "&e=" + EndDay + "&f=" + EndYear + "&g=" + freq + "&ignore=.csv"

----

which you should convert to your cell J29 in worksheet Parameters of your uploaded file.


Try changing it by something like this:

-----

[code]qurl = "URL;http://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/getFOHistoricalData.jsp?underlying=" & stockTicker & "&instrument=FUTSTK&expiry=" & StartMonth & "&type=-&strike=-&fromDate=&toDate=&datePeriod=3months&fileDnld=undefined"

-----


But you still have the problems of:


a) Check if that webpage exposes the results in tables so as to get the data in the way you requested or you'll have to get it exported to a .csv file and the process it. If it's exposed find out the table no. and change it in the code replacing the actual value of 20:

-----

.WebTables = "20"[/code]

-----


b) The dates you want to extract from a dropdown list box instead of taking them as parameters from the worksheet, are only displayed once you clicked on "Equity Derivatives", entered the company name or symbol, clicked on "Get Quote", and there you have the "Expiry Date" dropdown. To achieve this, if it's possible, you'll have to pilot IE (Internet Explorer) from Excel VBA, and this is far from being not a simple task, in fact it requires advanced skills in VBA and internet browsing.


Regards!
 
Back
Top