How to Use CSV Files Correctly—Explained Simply!
Using CSV files has many advantages and makes it possible to work with other interfaces. We'll show you how!
- Published
- Content reviewed
Listen to this article
Start reading aloud with a voice from your device. Changing the voice, speed or section stops playback; you can then start again.
Checking available voices.
Overview
Analyzing exchanged data can sometimes be frustrating—because not everyone uses Excel for their work. And even if they do, it’s not always easy to integrate data from one document into another without having to recalculate everything from scratch. Fortunately, you don’t have to manually type out endless data series to work with them in your Excel spreadsheet—thankfully, CSV files are available for this purpose.
With Excel 2016, Microsoft has added a new feature to this program in the successful Office suite that simplifies these tasks. Using the "Import Data" feature, you can now import data into Excel more easily, add your own calculations, and analyze it.
What is a CSV file?
A CSV (comma-separated values) file is a simplified text or database file that is typically used to exchange simply structured data. You can store tables or lists of any length in these CSV files. Most text or database programs, such as Excel, can export and import CSV files, making them a convenient way to exchange universally readable data sets.
CSV files are particularly common in accounting, as they make it easy to exchange large amounts of data about customers, products, and invoices. For this reason, many accounting programs can export CSV files so that a company’s accounting or controlling departments can work with the data without needing access to the actual accounting program or having to manually transcribe the data.
Import a CSV File into Excel
On the "File" tab, click the "Data" tab, and in the "Get and Transform" group, you'll find the "New Query" option. From the drop-down menu, select “From File” and then “From CSV.” A new window will open where you can browse for the file. Click “Import” to confirm your selection.
After you import the file into Excel, a preview window will open. In this window, you can check whether Excel has correctly recognized the data and its structure. If this didn't happen automatically, you can correct the source file format.
When you click “Transform Data,” you first load the data into Excel’s “Query Editor.” There, you can correct any errors that may have occurred during the data transformation. Generally, however, Excel’s import function works very reliably, so you usually won’t need to make any corrections here.
In the Query Editor, under the "Start" tab, you can remove one or more columns and/or rows, split columns, and create groups. Under the “Add Column” tab, you’ll find various options for adding columns, merging columns, and more. It also includes useful tools, such as automatically adding a date or time to an entry. In the “Transform” tab, you can edit the imported data by defining headers, reversing rows, and so on.
Edit Imported Data
After you've reviewed the data display in the Query Editor and confirmed it by clicking "Close & Load," Excel adds the data to the currently selected worksheet.
You can now use the data as if you had created it yourself. If categories, groups, and sort orders already exist, Excel will apply them to the imported data as well.
If you don't have them yet, you can still use Excel to organize large amounts of data—even without formulas.
Export an Excel spreadsheet as a CSV file
Conversely, if you want to save your Excel spreadsheet as a CSV file, go to the "File" tab and click "Export" on the left.
Under "Export," you'll find various options for exporting your spreadsheet. To export as a CSV file, select the bottom option, “Change File Type,” and then double-click to select “CSV (comma-separated)” (csv).
Quick Guide: Importing CSV Files into Excel
- Go to the "Data" tab and click "New Query" here
- Select "From File" and "From CSV," then open a CSV file
- Edit the CSV file as desired in the Query Editor
- Confirm your data selection in the Query Editor by clicking "Close and Load"
About the authors
Wiresoft Editorial Team
The Wiresoft editorial team explains software, licenses, and how to use Windows, Office, and servers in a clear and practical way. The articles are based on questions that customers ask Wiresoft in their day-to-day lives.
Sources and further reading
- Microsoft Support: Help and Learning for ExcelSource date:
Matching productsOffice