3 Easy Ways to Import Data from Another Workbook in Google Sheets
Step-by-step ways to import data from another workbook in Google Sheets. Learn about File>Import, IMPORTRANGE, and QUERY options to get the task done.
Looking to import data from another workbook in Google Sheets?
Luckily, there are several ways to get this done!
To help you choose with method to go with, here are brief summaries of each:
File>Import Option - best for when you have a copy of the sheet (either in your Google Drive or on your local computer), and you want to import all the sheets from the source workbook to Google Sheets. You can check the other options if you want to import a single sheet instead.
IMPORTRANGE - best for importing a specific data range from another Google Sheets workbook. This option will allow you to import a single sheet or even just a portion of a sheet from an external workbook.
QUERY - best for maximum flexibility, such as formatting the columns, changing labels, and preprocessing the data before it is imported to your spreadsheet.
If you have a copy of the sheet (either in your Google Drive or on your local computer), this option is the best to follow. Here are the steps:
Step 1: Click the File option in the main menu, and then click Import in the drop-down box. A large pop-up box titled Import file will appear.
Step 2: You get four options for the source workbook of the sheet to import: (1) your Google Drive (labeled as My Drive), (2) Shared with me, (3) Recent, and (4) Upload. Choose the option that will let you select the source workbook.
Step 3: After selecting the workbook (or uploading it, if you chose to upload from your local computer, a smaller box will appear, asking you what to do with the current sheet. You can (1) create a new spreadsheet, (2) insert the new sheet(s) to the current workbook (thus not replacing the existing sheets), or (3) replace the existing spreadsheets. Select your option.
Once you have selected your option, you can now start processing the data in Google Sheets.
Using IMPORTRANGE Function
The IMPORTRANGE function allows you to import a specific data range from another Google Sheets workbook. It has the following syntax:
Both the URL and the data range should be enclosed by quotation marks. The workbook must be either a public workbook or that you have access to it. If the workbook you are including is also yours, a prompt will pop up, asking you to connect the sheets. Click Allow access.
Afterward, the data will be loaded.
If the sheets are located in the same workbook (thus having the same URL), they still need to be added through the IMPORTRANGE function individually.
Using QUERY Function
For the sake of completeness, we still briefly discuss the QUERY function here. The QUERY function is the Google Sheets’ way of incorporating SQL queries to Google Sheets, giving you an additional powerful way to process and analyze data. This method is a little bit of a cheat, because it also uses the IMPORTRANGE function, but gives you more flexibility, which includes formatting the columns, changing labels, and preprocessing the data before it is imported to your spreadsheet.
Together with the IMPORTRANGE, there is so much more you can do with QUERY function. Just make sure you can access the source workbook! For starters, you can read here how to import data from another worksheet with SQL here: How to SQL Query Multiple Sheets in Google Sheets
After that, here are two tutorials you can follow: