Google Spreadsheets have become quite powerful and can be used to perform complex calculations and create dynamic dashboards. Just like in excel, you can import data from external sources into google spreadsheets. Let’s look at the different ways to do so. Open a new google spreadsheet and following the following steps.

Let’s say you want to retrieve the last stock price for Apple. The symbol for Apple stock is AAPL.

In a cell type =GoogleFinance("AAPL","price")


The above function will fetch the current price for Apple stock from Google Finance.

The GoogleFinance function can be used to retrieve both current and historical information about the securities. The full format of the function is given below:

GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date|num_days], [interval])

GOOGLEFINANCE("AAPL", "price", DATE(2012,1,1), DATE(2014,12,31), "DAILY")

• ticket (Optional) – The first parameter is the ticker symbol of the security for which you want the information.
• attribute (Optional) – The attribute is the information you want to fetch, for example, price, marketcap, volume, etc.
• start_date (Optional) – The start date when fetching historical data.
• end_date|num_days (optional) - The end date when fetching historical data, or the number of days from start_date for which to return data.
• interval (Optional) - The frequency of returned data; either "DAILY" or "WEEKLY".

### Using Yahoo Finance

You can also download the stock prices from Yahoo Finance. To do so, google spreadsheets come with a nifty function called IMPORTDATA that can be used to import data from a url in .csv/.tsv format. To retrieve the price of Apple stock from Yahoo finance, type the following function in Google Spreadsheet:

=importdata(“http://download.finance.yahoo.com/d/quotes.csv?s=AAPL&f=sl1d1t1c1ohgv&e=.csv”)