You can extract data using Google Docs, now called Google Sheets, with built-in formulas such as IMPORTHTML, IMPORTXML and GOOGLEFINANCE that pull a web table or a stock quote straight into a spreadsheet. We first published a short video on this in March 2010 using nseindia.com as the example. NSE has rebuilt its website since then, so this updated guide covers what still works in 2026 and what traders should use instead.
httpv://www.youtube.com/watch?v=ovOpb6q8d2c
The original 2010 video showed how to extract remote data from a web page (nseindia.com) into a Google spreadsheet and how to share the extracted table with the outside world. The steps below follow the same idea with the current Google Sheets menus and formulas.
Key takeaways
- Google Docs spreadsheets became Google Sheets. The import formulas from the 2010 video still exist and are documented by Google.
IMPORTHTML(url, "table", index)pulls an HTML table or list from a public web page into your sheet.- Most NSE pages now fill their numbers with JavaScript after the page loads, so
IMPORTHTMLusually returns blank cells or an error for them. - For NSE and BSE stock prices,
GOOGLEFINANCE("NSE:SYMBOL")is the simplest route, but quotes can be delayed by up to 20 minutes.
Extract data using Google Docs formulas: the four you need
| Function | What it reads | Example use for traders |
|---|---|---|
IMPORTHTML | A table or list on a public web page | A static table of index constituents or a holiday list |
IMPORTXML | Any element picked with an XPath query, plus XML, CSV, TSV and RSS feeds | A single number or headline from a page |
IMPORTDATA | A CSV or TSV file at a public URL | A downloadable bhavcopy-style CSV |
GOOGLEFINANCE | Google Finance quotes and history | Last traded price, high, low and volume for NSE or BSE stocks |
According to the Google Docs Editors Help page for IMPORTHTML, the syntax is IMPORTHTML(url, query, index), where query is either “table” or “list” and index counts from 1 in the order the tables appear in the page source. Lists and tables are counted separately, so a page can have both a list 1 and a table 1. For one specific cell, IMPORTXML with an XPath query works better.
Step by step: extract data using Google Docs (Sheets)
- Open sheets.google.com and create a blank spreadsheet.
- Paste the page address into cell A1, for example a Wikipedia page that holds the table you want.
- In cell A3, type
=IMPORTHTML(A1, "table", 1)and press Enter. - The first time you add an import formula, Google shows a warning banner. An editor has to click Allow access before any import in that sheet runs.
- If the wrong table appears, change the last number to 2, 3 and so on until you land on the right one.
- To share the result, use the Share button for named people, or File, Share, Publish to web to make a public link, which is what the original video demonstrated.
Google notes on its import functions help page that IMPORTHTML, IMPORTXML and IMPORTDATA check for new data every hour while the document is open, and that reopening the file does not force a refresh. Import formulas also cannot use volatile functions such as NOW() or RAND(). So this method suits end of day or slow-changing data, not live intraday prices.
Why NSE pages no longer import cleanly
In 2010 most NSE pages were plain HTML tables, which is why the video worked so smoothly. The current nseindia.com loads a page shell first and then fills the numbers using JavaScript calls to its own data endpoints. When we fetched the NSE option chain page directly while updating this post in November 2026, the HTML contained the table layout with empty price fields, and the underlying data URL returned an access error without browser cookies. IMPORTHTML only sees that first HTML response, so you get an empty table, a “Could not fetch url” message or an “Imported content is empty” error.
No formula trick gets around this reliably. If a table is only on NSE, use the CSV download link on that page and open the file in Sheets.
GOOGLEFINANCE: an easier way to extract NSE price data in Google Docs
For prices of listed Indian stocks you do not need to scrape NSE at all. GOOGLEFINANCE accepts an exchange prefix. As shown in this Info Inspired walkthrough, NSE symbols use the NSE: prefix and BSE scrip codes use BOM::
=GOOGLEFINANCE("NSE:HDFCBANK","PRICE")
=GOOGLEFINANCE("BOM:500180","PRICE")
=GOOGLEFINANCE("NSE:RELIANCE","high")
=GOOGLEFINANCE("NSE:RELIANCE","close",DATE(2026,1,1),DATE(2026,3,31),"DAILY")
Keep the limits in mind. Google’s GOOGLEFINANCE help page says quotes may be delayed by up to 20 minutes, are not sourced from all markets, and are provided for information only, not for trading. Historical data from the function also cannot be downloaded or read through the Sheets API or Apps Script; those cells return #N/A.
For traders: when to move beyond Google Sheets
A Google sheet is fine for a watchlist, a portfolio tracker or a monthly review of valuations. Our older video on getting the historical PE ratio of Nifty is a good example of the kind of slow-moving data that works well in a spreadsheet.
For intraday data, option chains or clean backtest history, spreadsheet scraping is fragile. Two better routes:
- Use your broker’s trading API, which gives authorised quotes and history for your account.
- Write a short Python script. See our Beautiful Soup web scraping tutorial and run it free in Google Colab.
Frequently Asked Questions
Can I still extract data using Google Docs from nseindia.com?
Mostly no. Most NSE pages now load their numbers through JavaScript, which IMPORTHTML and IMPORTXML cannot run. Use GOOGLEFINANCE for prices or download the CSV that NSE provides and open it in Sheets.
Is Google Docs the same as Google Sheets?
In 2010 the spreadsheet was part of Google Docs. Today it is a separate app, Google Sheets, documented under Google Docs Editors Help.
How often does IMPORTHTML refresh?
Google says the import functions check for updates every hour while the file is open. Deleting and re-entering the formula forces a fresh fetch.
Is GOOGLEFINANCE data real time for NSE stocks?
No. Google states that quotes may be delayed by up to 20 minutes and are for information only, not trading. Use a broker feed for live trading decisions.
Learn by watching: free videos every week
Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.


Hi Rajandran ,
I would like to know how to get – The Foundation by Southwind v-13.00 Int AFL Code on my PC , please tell from the scratch in simple language . thx.
Really Rajendaran, good video help us in publishing, blogging. Thanks to introduce us for this new knowledge.
Thanks, and keep it up.
Regards:
Sourabh
Jitin the Instructions are given here
http://www.marketcalls.in/2010/02/the-foundation-by-southwind-v-13-00-int-afl-code.html
Dear Mr. Rajendran,
Very useful video. Thanks for the same.
and Southwind v-13.00 – wrking fien, but how to use it, if any manual ava, pls share the link.
Thank you,
sat
Dear Rajandran
A very interesting bit of information watching this video on “importing” data from nse. I am facing a problem. Could you please help. When I write “importhtml….nothing happens..ie no options of url/query etc pop up. Am I missing something out. Please advise.Thanks and Regards.
Rajandran,
You are gr8…as always.Thanx for introducing newer technologies to novices like us.Ur simple style of explaination is awsome.
Regards
Thanks Amrishali….I was just giving a try
Thank Rajendran for nice video. I use excel extensively in my trading but u have just exposed me to great feature of google docs.
Thanks again.. and keep up the great work.
Really helpful post. Thanks
Nice explanation about importing the data.
but do the data keep on changing ? or its static ?
Hi vineet… If the data size is very huge then it updates only when you open the speadsheet. If the data size is small then it updates every 30 minutes.
Real time is not possible 🙂
Thanks for the data. If I apply this formula, I get an error message. I am not able to retrieve the data. Please can you help.
Dear Rajendran,
The nse data is still extractable with google docs?
Thanks
Noufel
Hi,
This does not work with the new version of the NSE website.
Are you able to import to google docs?
Thanks,
Keerthi
@Keerthi : Now i switched to Editgrid it works well there. Havent tested the new version with NSE India in Google docs
Dear Rajendran…
Is there any provision to get real time stock data into Excel…
atleast that for NSE stocks…??
@sunil
Yes if your odin supports DDE then it is possible to get the realtimedata in excel
Dear Rajandran
We got very interesting information watching this video on “importing” data from nse. I am facing a problem. If i apply this formula, i am not able to retrieve the data from the new version of the NSE website. Please help…
Thanks for posting this useful tutorial.
Can you please help me to extract data from NSE or ODIN for currency rates into google docs
Regards and Thanks again.
I want to get the stock prices of peer companies for various dates in excel sheet from nseindia.com. Could you please help me out. for example
20/3/2013 12/3/2012
L&T 1003 870
Adani 15 30
hi,
very helpful website. thanks.
i have a problem downloading using web queries from nseindia.com. How can one download data through excel web query when the said site has dropdown menus. To understand my problem better, try downloading 8100c for the month of sep14 through webqueries.and then refresh. is there is a way to work around drop down menu selection? something from vba.
thanks
Hi Try with Kimonolabs
http://www.marketcalls.in/datafeed/turn-financial-site-financial-api.html
Hi Abhijith,
Check with PromptCloud.
Hello Rajendran,
Could this spreadsheet be used for creating screens for few selected parameters. For example, I wish to know all scrips listed in NSE whose market cap is less than the previous years total sales or say a list companies whose total debt is less than 10 Cr. and so on. If not, then is there a way it can be done for both NSE and/or BSE. Kindly opine. Thank you.
try with screener.in i guess that solves your problem.
Thanks, Rajandran. I know about that site but did not find the search parameters for debt screening and ratios of market cap in relation to total sales and similar stuff. No sure, maybe I might have overlooked something.
You can try the query something like this:
Market Capitalization < Sales AND
Debt < 10
Results:
http://www.screener.in/screens/new/?query=Market+Capitalization+<+Sales+ANDDebt+<+10&sort=&order=
Hello Rajan,
How to extract data from Economictimes website (http://economictimes.indiatimes.com/marketstats/pid-0,pageno-1,sortby-abschange,sortorder-desc,sort-intraday.cms) and suggest me good websites for analytics of the extracted data, Thanks in advance.
hi rajandra,
your website has been extremely useful to me. thanks. i wonder if you suggest some software/freeware for accounting of digital contract notes. updating everyday in excel sheet based on type of trade i.e. fno, cash intraday, short term trade, long term, etc is becoming cumbersome. what may be the way out?
thanks in advance.
mprofit i guess. Seen their site havent tried yet. But guess your requirement might match. Try it out let me know.
Hi Rajendran,
I am not able to pull NSE data in google docs. Though the same is working fine when I try to import NSE data at the desktop EXCEL file.
Same is not working when applying to Google Docs.
Please help
I have tried
=importhtml(“http://nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?symbolCode=-10006&symbol=NIFTY&symbol=NIFTY&instrument=-&date=-&segmentLink=17&symbolCount=2&segmentLink=17″,”Table”,2}
Its no more working. NSEindia had made restriction to parse the data from their site probably to reduce unwanted server load.
excel webquery for nifty options works. i use it regularly.
the below link is working in google spreadsheet.
=IMPORTHTML(“http://nse-india.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?&symbol=NIFTY&date=24SEP2015″,”table”,3)
regards,
sathesh
Thank Rajendran for nice video. I use excel extensively in my trading but u have just exposed me to great feature of google docs.
Thanks again.. and keep up the great work. Ravi
Hello Mr. Rajendran,
Kindly help me in publishing with Excel
as of now
How To Download Today’s Result csv From NSEINDIA ?
https://www.nseindia.com/live_market/dynaContent/live_watch/derivative_stock_watch.htm
Not able to pull data from this.. I guess it is not taking table parameter.. Can you please help me.
Thank you for the informative video. I have been trying for a considerable time to extract data from google sheets into ninjatrader 7. If you have any advice with this I would truly appreciate it.
Hii sir i want to know how to extract query link from nseindia.com please let me know….?