Hey there, data wranglers! If you’ve ever used Excel, you’ll know that one of its primary uses is managing data. But before the sorting, filtering, charting, and formula crafting, there’s an essential first step: getting the data into Excel. From the simplest method to more advanced techniques, we’re going to explore the many avenues of importing data into Excel. So grab a cup of your favorite brew and settle in – this is going to be a ‘fun’ ride!
1. The Simplest Way: Opening a File
If you’ve got a file with data that Excel can read (like .xlsx, .xls, .csv, or .txt), importing it is as easy as pie. You can open the file in Excel just like you would open any other file in a program:
- Go to the ‘File’ tab, then ‘Open’, and navigate to your file’s location.
- Alternatively, you can use the shortcut Ctrl+O.
Once your file is open, Excel will display the data in the normal worksheet view (rows and columns), ready for you to work with.
2. Copy-Paste and Drag-Drop: Quick and Dirty
Perhaps the most straightforward method is the good old copy-paste:
- Open your source file, select your data, then copy it (Ctrl+C).
- Open Excel, click on the cell where you want your data to start, and paste (Ctrl+V).
Excel will do its best to keep the data’s original formatting and structure, but may stagger a bit with the formatting if your source contains images, some characters, or odd formatting. If your data is in another Excel workbook, a text document, a web page, or another place where you can highlight and copy text, this method works like a charm.
The drag-and-drop method works similarly, but instead of copying and pasting, you’re dragging data directly from the source file to Excel. This method is usually quicker but could be less precise if you have a shaky hand or a super fast gaming mouse.
3. Import Data from Text/CSV Files
For text or CSV files, Excel has a specific data import wizard to help format your data correctly.
- Go to the ‘Data’ tab, then ‘Get Data’ > ‘From File’ > ‘From Text/CSV’.
- Navigate to your file, select it, and click ‘Import’.
Excel will open a dialog box that shows a preview of your data and some options for how to handle it. You can specify the delimiter (comma, tab, semicolon, etc.) and data type for each column.
4. Get Data from a Database
Excel also allows you to import data from various database systems like SQL Server, Access, or MySQL.
- Go to ‘Data’ > ‘Get Data’ > ‘From Database’.
- Choose the database source that matches your needs.
- Provide the requested information (such as the server address, database name, and login credentials), and Excel will connect to the database and allow you to choose the tables or views to import.
5. Import Data from the Web
If your data resides on a webpage, Excel can scrape it for you:
- Go to ‘Data’ > ‘Get Data’ > ‘From Other Sources’ > ‘From Web’.
- Input the URL of the webpage containing the data.
- Excel will open the Navigator window, showing the tables available on the webpage. Choose the one you want, and voila!
6. Linking to Another Excel Workbook
If you’re working with data that’s frequently updated in another Excel workbook, you can create a link between the two:
- Open both workbooks.
- In the destination workbook, select the cell where you want to start the linked data, type ‘=’, then click the cell with the data in the source workbook.
- Press Enter.
- The cell in the destination workbook now contains a formula that references the cell in the source workbook. This means it will always display the current data from the source workbook—even if the source data changes, the destination data will update automatically. You can copy this formula across other cells if you need to link more data.
- You can also get data from another workbook by following the process shown above for text/csv. Doing it this way has the advantage of importing the data into a table, AND it gives you the option to refresh the data as changes happen in the source, as long as it stays in one place.
7. Data Import with Power Query
Now, let’s step into the realm of Power Query—a powerful data connection technology that enables you to discover, connect, combine, and refine data across a wide variety of sources. Power Query is available as an add-in for Excel 2010 and 2013, and is built-in from Excel 2016 onwards (in the ‘Data’ > ‘Get & Transform Data’ group).
Power Query can connect to a multitude of data sources, from simple text files, CSVs, and Excel workbooks, to databases (SQL Server, Access, Oracle, IBM DB2, etc.), and online services (SharePoint, Exchange, Dynamics 365, and many others).
Here’s the basic process of using Power Query:
- Go to the ‘Data’ tab, then ‘Get Data’. Choose the data source that fits your needs.
- After you’ve selected your data, Power Query will display it in the Power Query Editor—a dedicated window where you can clean, transform, and reshape your data using intuitive GUI commands.
- Once you’ve finished refining your data, click ‘Close & Load’ to import the data into Excel.
One of the key advantages of Power Query is that all the steps you take to transform the data are recorded in the Query Settings pane. This means you can re-run the same steps on different data or updated data, saving you a lot of time if you frequently need to import and clean similar data.
8. Power Query Advanced Features
Power Query also offers advanced features to handle complex data scenarios. For example, you can merge or append queries, which is useful for combining data from multiple files or databases that have a similar structure.
It also has a robust formula language called M, which gives you almost unlimited potential to manipulate data. For example, you can use M to create custom columns, filter rows based on complex criteria, or automate data cleaning routines. Don’t worry, we’ll do a few articles on Power Query separately to go a bit more in depth, but can you imagine how long this would be if it were all here? Yikes!
9. Final Thoughts
Importing data into Excel is like opening the door to a treasure trove of data analysis possibilities. With a wide range of options available—from the simplest copy-paste to the advanced capabilities of Power Query—you can handle virtually any data scenario.
And most importantly, have fun while you’re at it. Because as any seasoned Excel user will tell you, there’s a certain joy in turning raw data into meaningful insights. Until next time, happy data wrangling!





Leave a comment