Excel Import Data (Table of Contents)
Import Data In Excel
Microsoft has provided some functions that can be used to import the data from different sources and connect them with excel. We can import the data from different sources such as from Access, Web, Text, SQL Server or any other database. We can connect Microsoft Excel with many sources and import the data in many ways.
How To Import Data In Excel?
Let’s see how to import data in Excel by using some examples:
Import Data In Excel – Example #1
Many times we faced a situation where we need to extract or import the data from other sources. And in Excel, we can use the function Get External Data to import the required fields to work from different sources.
We can extract the data in excel by going in the Data menu tab, under getting and Transform data, select any required source as shown below.
Those options are shown in the below screenshot.
There are many different ways to import data in excel.
- From Text/CSV: Text files whose data can be separated with a tab or excel columns.
- From Web: Any website whose data can be converted to excel tables.
- From Table/Range: Create a new query linked to the selected Excel table or named range.
Above mentioned ways of importing the data are majorly used. There are some other ways also, as shown in the below screenshot. For that, click on From SQL Server Database under From Database section. Once we do that, we will get a drop-down list of all the other sources from where we can import the data.
Once we import the data from any server or database, the connection gets established permanently till we remove it manually. And in the future, we can import the data from previously established and connected sources to save time. For this, go to the Data menu tab; under Get & Transform Data, select Existing Connections as shown below.
Once we click on it, we will get a list of all existing connections which we link with our computer or excel or network, as shown below. From that list, select the required connection point and click on Open to access that database.
Now let’s import some data from any website. For that, we must have the link to that website from where we need to import the data. Here, for example, we have considered the link of Wikipedia as given below.
Now, go to the Data menu; under Get & Transform Data section, select From Web as shown below.
Once we do that, we will get a Web Query box. There at the address tab, copy and paste the link and click on Go as shown below.
It will then take us to the web page of that link, as shown below. Now click on the Import button to import the data.
The Import Data box will appear, asking for a reference cell or sheet to import the data. Here we have select cell A1 as shown below. And click on, OK.
Then the query will run, and it will fetch the data from the provided link as shown below.
Import Data In Excel – Example #2
Let’s see another way of importing the data. For this, we have some sample data in Notepad (or Text) file, as shown below. As we can see, the data has spaces between the lines like columns in excel has.
Importing such data is easy as it is already separated with spaces. Now to import the data in the text file, go to the Data menu tab, under the getting and Transform data section, select From Text option as shown below.
After that, we will get a box where it will ask us to browse the file. Search and select the file and click on the Import button to process further.
Just after that, a text import wizard will appear, which will ask us to delimit or separate the text. Select the Delimited option for a proper way to separate the data into columns or select the Fixed Width option to do it manually. Here we have selected Delimited as shown below.
Here we have delimited the text with Tab as shown below. Now click on Next to complete the process.
Now select the way we want to import the data. Here we have selected cell A1 for the reference point and click on OK.
We will see our data imported to excel from the selected file.
Like this, we can import the data from different sources or databases to excel to work on them.
Pros of Importing Data in Excel
- By importing the data from any other sources, we can link different tables, files, columns, or sections and get the data we require.
- It saves time by manually copying and pasting the heavy data from one source to excel.
- We also avoid unnecessary crashing or handing of files if the data is huge.
Cons of Importing Data in Excel
- Sometimes processing time is huge.
Things to Remember
- Make sure you are connected to a good internet connection when you are importing data from SQL Servers or similar databases.
- Do not do anything while data is being imported from the source files or database. It may crash the opened files.
- Always protect the previously established connection with a password.
This has been a guide to Importing Data in Excel. Here we discussed how to import data in excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles to learn more –