For various purposes, you may need to get data from Excel to Google Sheets. In this article, I will show you how you can import data from Excel to Google Sheets.
Import Data from Excel to Google Sheets: 2 Ways
Here, I created an Excel file with some data from a particular store and Saved it in a particular place to Import these into Google Sheets.
1. Using Google Drive to Import Data from Excel
You can use Google Drive to import data from Excel to Google Sheets. It’s a very much handy and useful way to do it.
- First, go to Drive >> then click on New.
- Second, select File Upload.
Next, Windows Explorer will appear.
- From there select your Excel File.
- Finally, click on Open.
The Excel File will be uploaded to the Drive.
- Now, select the Excel File >> right-click on it to bring Context Menu bar.
- Then, from Open with >> select Google Sheets.
Now, data will be imported from Excel to Google Sheets.
2. Use of Import Feature of Google Sheets
The Google Sheets also gives us the opportunity to use the Import option from the File menu to import data from an Excel file into it. You can use the Import option in both ways.
2.1. Importing from Drive
To open a google sheet either you can search Google Sheets or you can go there from Drive.
A new Google Sheet will open.
- Now, from File >> select Import.
A dialog box of Import File will appear.
- From there search for the Excel file name if you uploaded the Excel file earlier.
- Next, select the Excel File.
- Then, click on Select.
Again, another dialog box will appear with the Excel File.
- Next, select Replace spreadsheet.
- Finally, click on Import Data.
Therefore, the data from Excel File is imported into Google Sheets.
- Now, give any name of your choice.
2.2. Importing from Device
If your Excel File is not uploaded in the Drive then you can use other options available.
Here, I will use the Upload option to import data from an Excel file to google sheets.
- Follow Method 2.1 to bring the Import file dialog box.
- Next, select Upload >> click on Drag a file here (Either you can click to open the windows explorer or you can drag your file here).
Next, Windows Explorer will appear.
- From there select your Excel File.
- Finally, click on Open.
A dialog box of the Import file will appear again.
- Next, select Create new spreadsheet.
- Finally, click on Import Data.
- Next, select Open now.
As a result, whole Excel File data are imported to Google Sheets along with the file name.
How to Use VBA to Import Data from Google Sheets to Excel
You can use VBA to simply import data from Google Sheets to Excel automatically and easily.
Before going to the code I will share with you how you can create a web link to any google sheets file.
- From File menu >> select Share >> then select Publish to web.
A dialog box of Publish to the web will appear.
- Now, press CTRL+C to copy the link.
- Also, select Entire Document from Published content and settings.
- Finally mark on Automatically republish when changes are made.
- Now, open the Developer tab >> select Visual Basic.
- Next, from Insert tab >> select Module.
- Then, type the following code in the Module.
Sub Import_Data_from_GoogleSheets()
With ActiveSheet.QueryTables.Add("URL;https://docs.google.com/spreadsheets/d/e/2PACX-1vQCa673RHnviC5vzh43vt7UfzcD4mcw3232rDnUC-uT76tw87TIqLD5IYYr20Bmow/pubhtml", Destination:=Range("$A$1"))
.WebTables = "2"
.Refresh False
End With
End Sub
Code Breakdown
- Here, I created a Sub procedure named Import_Data_from_GoogleSheets()
- Next, used With Statement to write a series of statements for the Activesheet.QueryTables object.
- Then, in the URL I used the shared publish to web link. You have to share your google sheets first to use this code.
- Above, I showed you how to share google sheets.
- Now, Save the code and go back to your sheet.
- From the Developer tab >> select Macros
A dialog box of the Macro will appear.
- Here, select Import_Data_from_GoogleSheets.
- Finally, click on Run.
Here, the data are imported from Google Sheets to Excel automatically.
Download Practice Workbook
Conclusion
In this article, I tried to explain how to import data from Excel to Google Sheets. This explanation will help you to understand the ways. Last but not least, if you have any kind of suggestions, ideas, or feedback please feel free to comment down below.
Related Articles
- How to Copy and Paste from Excel to Google Sheets
- [Solved:] Copy Paste from Excel to Google Sheets Not Working
- How to Copy from Excel and Paste to Google Sheets with Formulas
- 10 Key Differences Between Google Sheets and Excel
- Differences Between Excel and Google Sheets Formulas
- Pros and Cons of Google Sheets vs Excel – Which Is Better?
- IMPORTRANGE Function to Import Data from Excel to Google Sheets