4 - Loading Text Files - Method 2
4 - Loading Text Files - Method 2
Learn
To do this, you'd make a copy of the text file ending in "txt" so you still have the
original, then change the file extension of the new file to end in "csv," so now it
would look like sales_data_set_start.csv . Then, you'd go back to Excel, and
select Open to load the file as you did in Method 1.
This time, you don't need to change the file type to see the file. Excel recognizes
the CSV file just as it recognizes a regular Excel file ( .xlsx ), and it will open it in
Excel without using the Wizard. CSV files have become so ubiquitous in the world
of data that Excel finally made it straightforward to simply open them like any
other workbook. There is one point of caution for this method, and it's that
you need to be sure your dataset is comma-separated before you change the file
extension!
CSV files are wonderful for passing datasets between different applications
because they've become a standard among data file formats. However, it's often
advantageous to save your CSV file as an Excel file ( .xlsx ). This is especially
true if you plan to use Excel to manipulate the file going forward. If you're working
with smaller files, like the one you're using in this lesson, the file size
will increase after being converted to an Excel file because of the extra overhead
https://app.dataquest.io/c/127/m/652/importing-data-into-excel-spreadsheets/4/loading-text-files-method-2 1/3
10/2/23, 2:14 PM Importing Data Into Excel Spreadsheets — Loading Text Files: Method 2 | Dataquest
that goes along with XLSX files. But, if your CSV file is quite large (larger than
100 MB), then saving it as an Excel file will often reduce the size of the file. And
having it in XLSX format allows Excel to be more efficient with the file because it's
optimized to work with Excel's native file format.
Finally, there is one more thing you need to know. If you simply go to Data > Get
Data to import your data, you'll be using Excel's Power Query tool, which
modifies the data format and uses advanced features that are beyond the scope
of this course.
Instructions
Notice that while you're browsing for files in Excel, the application
displays information about each file, such as Type and Size .
Use the drop-down menu on the right side of your screen, next to
the Save icon, to select the file type Excel Workbook (*.xlsx).
If you get a warning message saying the file already exists, select Ok to
replace the existing file.
https://app.dataquest.io/c/127/m/652/importing-data-into-excel-spreadsheets/4/loading-text-files-method-2 2/3
10/2/23, 2:14 PM Importing Data Into Excel Spreadsheets — Loading Text Files: Method 2 | Dataquest
Questions
1. True or False: it's always appropriate to change the file extension of a dataset in
order to load it.
Correct!
False
This is correct.
True
2. What can you say about the size of your data file after you converted it from a
CSV to an Excel file?
(select all that apply)
Correct!
This is correct.
This is correct.
https://app.dataquest.io/c/127/m/652/importing-data-into-excel-spreadsheets/4/loading-text-files-method-2 3/3