Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

How to Extract Data from NSEIndia.com Using Google Docs (Google Sheets) in 2026

3 min read

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.

TradEdge 12.0: Read the market like a professional

LIVE MENTORSHIP · JAN 2027

TradEdge 12.0: Read the market like a professional

Live online mentorship on Market Profile, Orderflow and Volume Spread Analysis for Nifty, Bank Nifty and stocks.

  • 85+ hours of live, interactive sessions
  • Trade setups built on auction structure and order flow
  • Risk management and trading psychology

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 IMPORTHTML usually 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

FunctionWhat it readsExample use for traders
IMPORTHTMLA table or list on a public web pageA static table of index constituents or a holiday list
IMPORTXMLAny element picked with an XPath query, plus XML, CSV, TSV and RSS feedsA single number or headline from a page
IMPORTDATAA CSV or TSV file at a public URLA downloadable bhavcopy-style CSV
GOOGLEFINANCEGoogle Finance quotes and historyLast 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)

  1. Open sheets.google.com and create a blank spreadsheet.
  2. Paste the page address into cell A1, for example a Wikipedia page that holds the table you want.
  3. In cell A3, type =IMPORTHTML(A1, "table", 1) and press Enter.
  4. 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.
  5. If the wrong table appears, change the last number to 2, 3 and so on until you land on the right one.
  6. 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:

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.

Marketcalls Elite Traders Club

MEMBERSHIP

Marketcalls Elite Traders Club

Every Marketcalls course and live mentorship in one membership: 127 courses and 2,500+ hours of learning.

  • Market Profile, Orderflow, AFL, Pine Script and Python
  • Live mentorship and TradEdge trading room
  • Premium tools and the Elite Slack community

Learn by watching: free videos every week

Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.

Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

41 Replies to “How to Extract Data from NSEIndia.com Using Google Docs…”

  1. 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.

  2. Really Rajendaran, good video help us in publishing, blogging. Thanks to introduce us for this new knowledge.

    Thanks, and keep it up.

    Regards:
    Sourabh

  3. 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

  4. 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.

  5. Rajandran,
    You are gr8…as always.Thanx for introducing newer technologies to novices like us.Ur simple style of explaination is awsome.
    Regards

  6. 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.

    1. 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 🙂

  7. 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.

  8. Hi,

    This does not work with the new version of the NSE website.

    Are you able to import to google docs?

    Thanks,
    Keerthi

  9. Dear Rajendran…

    Is there any provision to get real time stock data into Excel…
    atleast that for NSE stocks…??

    1. 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…

  10. 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.

  11. 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

  12. 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

  13. 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.

      1. 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.

  14. 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.

  15. 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

  16. 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}

  17. 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

  18. 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

  19. 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.

  20. Hii sir i want to know how to extract query link from nseindia.com please let me know….?

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More