Both Excel and Google sheets are widely used for data analysis and performing different sorts of calculations and both have some specific benefits. Sometimes, we may want to import data from google sheets to Excel worksheets for getting some advantage in data analysis. In this article, I will show 3 easy ways to import data from google sheets to Excel worksheets.
Download Practice Workbook
You can download the practice workbook from here.
3 Easy Ways to Import Data from Google Sheets to Excel
We can import data from google sheets to Excel in several ways. 3 such easy ways are described in the following section. For explaining the procedure, I have introduced a dataset containing Product, Size, and Price.
1. Download Google Sheets as Excel File
One of the ways to import data from google sheets is to download the google sheet as an Excel file. I am showing the steps for the procedure.
- Firstly, open the google sheet that you want to import.
- Next, select File > Download.
- Further, choose Microsoft Excel (.xlsx) from the options.
- Consequently, the Save As window will pop up.
- Now, change the name of the file if needed and select Save.
- Finally, our google sheet is saved as an Excel file.
In this way, we have successfully imported data from google sheets to Excel Worksheets.
Read More: How to Download Google Sheets to Excel (2 Easy Ways)
2. Import Live Data to Excel from Google Sheets Link
Instead of saving google sheets as an Excel file, we can also link google sheets to Excel worksheets. This way, if we update data in google Sheets it will automatically reflect on the Excel worksheet. Let’s follow the steps given below for the procedures.
- Firstly, open the google sheet from where we want to extract data.
- Then, select Share from the upper right corner of the google sheet.
- Instantly, A Share window will appear.
- Further, select Copy link from there and press Done.
- Now, open an Excel worksheet and select the Data tab from the ribbon.
- Afterward, from the Data tab select Get Data > From Other Sources > From Web.
- After that, a From Web window will show up. Paste the copied link in the URL field.
- Then, change the attributes edit?usp=sharing with export?format=xlsx and press OK.
- A Navigator window will appear, select the sheet to import then press Load.
- Bravo! We have successfully imported live data from google sheets to Excel.
- If we change data in google Sheets, all we need to do is Refresh All from the Data tab for updating the data.
Read More: How Can I Link Google Sheets to Excel in Real Time?
3. Apply VBA to Import Data from Google Sheets to Excel
Another way to import data from google sheets to Excel is the use of Visual Basics for Applications(VBA) code. The procedures for using VBA code to import data from google sheets are given below stepwise.
- Firstly, open the VBA window by pressing the keyboard shortcut Alt + F11.
- Then, select the active sheet from VBA Projects and right-click.
- Further, select Module from the options.
- Consequently, a module window will appear, write the following code there.
Sub Import_Google_Sheet() Dim iKyStrn As String Dim iGidStrn As String iKyStrn = "1YJXOrL5KxrSdcCMHUxktJ5kz3BbJU7w5afKY9kJ_R18" iGidStrn = "1925099421" With ActiveSheet.QueryTables.Add(Connection:= _ "URL;https://spreadsheets.google.com/tq?tqx=out:html&tq=&key=" & _ iKyStrn & "&gid=" & iGidStrn, Destination:=Range("$A$1")) .Name = "q?s=goog_2" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "1,2" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End Sub
Note: In the code,
iKyStrng = "1YJXOrL5KxrSdcCMHUxktJ5kz3BbJU7w5afKY9kJ_R18"
replace the iKyStrng value with the address of the desired google sheet
iGidStrng = "1925099421"
replace iGidStrng value with the address of a specific tab of google Sheets.
- Now, press the Run key from the VBA window.
- Finally, you will be able to import data from google sheets to Excel worksheets.
Read More: How to Import Data from Google Sheets to Excel Using VBA
How to Import Excel File to Google Sheets
For various reasons, we may want to export data from Excel worksheets to google sheets. Suppose, we have a google sheet whose dataset contains product, Size and Price. We want to export the dataset to google sheets. Here, I will discuss the way to import Excel files to google sheets. Please follow the steps given below.
- Firstly, open the google sheet.
- Then, go to File and select Import from the options.
- Consequently, an Import file window will appear. Select Upload from there.
- Now, click on Select a file from your device, browse the Excel file to import and select Open.
- After that, in the Import file window select Replace spreadsheet.
- Further, select Import data.
- We are done with importing data from an Excel file to google spreadsheets.
Both google spreadsheets and Excel worksheets work fine in doing various mathematical operations though both have some different advantages. In this article, I have shown 3 easy ways to import data from google spreadsheets to Excel worksheets. If you have any queries about the procedures, please let us know by commenting. Please, visit our ExcelDemy site for similar articles about Excel.