← Google Sheets from Scratch: Formulas, QUERY, and Collaboration
Lesson
Lesson 2: Importing data: IMPORTRANGE, IMPORTHTML/IMPORTDATA, GOOGLEFINANCE, GOOGLETRANSLATE
Pull external data into a spreadsheet: from another Google Sheets spreadsheet or a web page, plus stock quotes and text translations.
Cloud superpowers: importing external data
Cloud superpowers: importing external data
Google Sheets can pull live data from the internet right into cells, something that takes separate tools in Excel. These are unique cloud functions.
IMPORTRANGE lets you take a range from another Google Sheets spreadsheet: =IMPORTRANGE("spreadsheet_url", "Sheet1!A1:C10"). The first time you use it, Sheets asks you to allow access — click “Allow access” once. After that, the data updates automatically (with a short delay). IMPORTHTML pulls tables and lists from web pages: =IMPORTHTML("url", "table", 1) gets the first table on the page. IMPORTDATA loads a CSV/TSV file from a link.
GOOGLEFINANCE returns financial data: =GOOGLEFINANCE("AAPL") gives the current price of Apple stock (delayed by up to 20 minutes, according to Google). You can add an attribute: =GOOGLEFINANCE("AAPL", "price"). This is not financial advice, just a learning tool. GOOGLETRANSLATE translates text in a cell: =GOOGLETRANSLATE("Hello", "en", "es") returns “Hola”. Keep in mind: live imports work only in real Google Sheets — here you practice the syntax; try it in your own spreadsheet.
Lesson notes
Cloud superpowers: importing external data
Google Sheets can pull live data from the internet right into cells, something that takes separate tools in Excel. These are unique cloud functions.
IMPORTRANGE lets you take a range from another Google Sheets spreadsheet: =IMPORTRANGE("spreadsheet_url", "Sheet1!A1:C10"). The first time you use it, Sheets asks you to allow access — click “Allow access” once. After that, the data updates automatically (with a short delay). IMPORTHTML pulls tables and lists from web pages: =IMPORTHTML("url", "table", 1) gets the first table on the page. IMPORTDATA loads a CSV/TSV file from a link.
GOOGLEFINANCE returns financial data: =GOOGLEFINANCE("AAPL") gives the current price of Apple stock (delayed by up to 20 minutes, according to Google). You can add an attribute: =GOOGLEFINANCE("AAPL", "price"). This is not financial advice, just a learning tool. GOOGLETRANSLATE translates text in a cell: =GOOGLETRANSLATE("Hello", "en", "es") returns “Hola”. Keep in mind: live imports work only in real Google Sheets — here you practice the syntax; try it in your own spreadsheet.