How to Convert a CSV File to XLSX (Excel) or Google Sheets

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on June 1, 2023

This tutorial demonstrates how to convert a CSV file to Excel or Google Sheets.

Convert Intro

 

Excel has the ability to open or import both CSV and TXT files.

Open a TXT or CSV File in Excel

  1. In the Ribbon, go to File > Open > Browse, and then choose the text or CSV file to be opened.
    The Text Import Wizard opens to the first of three steps.

Convert Step1

  1. Depending on the data contained in the file, you can either choose Delimited or Fixed Width as the file type. If the data is separated with a character like a comma, semicolon, space, or tab, choose Delimited. If the first row of data contains column headings, check My data has headers.
  2. Click Next for Step 2.
  3. In Step 2, choose the type of delimiter contained in your text file – in this case, tab delimiter.
  4. Then choose the text qualifier. In some cases, data may be enclosed in quotation marks, but for this example, (none) is selected as the text qualifier.

Convert Step2

  1. Click Next for Step 3.

Convert Step3

  1. The final step of the Text Import Wizard lets you specify the data type for each column. Most of the time, Excel will be able to determine the data type automatically, and you can leave the Column data format as General.
  2. Click Finish to import the data into Excel.

Convert Text File

Open a CSV File in Excel From Windows Explorer

A CSV file is similar to a text file, but due to the fact it has the .csv extension, it is typically shown in Windows Explorer as associated with Excel.

Convert GetData Files Format

This means that, when you double-click on the file in Windows Explorer, it automatically opens in Excel. As it is a comma-delimited file, Excel automatically separates the data into columns, without the need to use the Text Import Wizard.

If a CSV file does not show the Excel icon, then it won’t open automatically in Excel, but that can be changed.

  1. To associate a CSV file with Excel, right-click on the file in Windows Explorer and then click Properties.

Convert GetData Files Properties

  1. To the right of Opens with, click Change.

Convert OpensWith

  1. Choose Excel, and then click OK.

Convert OpensWith Excel

  1. All CSV files now automatically open with Excel. Double-click on the CSV file from Windows Explorer to open the file in Excel.

Convert GetData Import

    1. The delimiter in the file (in this case, a comma) and file origin are automatically detected. Excel parses the columns based on the data contained in the file as determined by Excel. Click Load to import the data into Excel.

Import a Text File: Get Data

An alternate way to import data into Excel from a text or CSV file is to use the Get and Transform Data command.

  1. In the Ribbon, go to Data > Get and Transform Data > From Text/CSV.

Convert GetData Ribbon

  1. Find the file you want, and then click Import.
  1. The file appears in a dialog box with the delimiter already automatically detected, and the text divided by Excel according to the data stored in the CSV file. Click Load to import into Excel.

Convert LoadData

The data now appears in a new sheet in Excel. There are now two new tabs on the Ribbon: Table Design and Query. A Queries & Connections pane appears on the right-hand side of the screen. This shows you that the data is linked to the CSV file and if any data in the CSV file changes (external to Excel), then the data displayed in Excel would change too. This is especially useful when the data in Excel is linked to an external file such as a database.

Convert GetData LinkedData

  1. To unlink the imported data from the external CSV file, in the Ribbon, go to Table Design, External Table Data > Unlink.

Convert GetData Unlink

  1. The data is imported into Excel as a table. To convert it to a standard range, in the Ribbon, go to Table Design > Tools > Convert to Range.

Convert GetData ConvertToRange

The Table Design and Query tabs on the Ribbon disappear.

Convert a CSV File to a Google Sheet

  1. From the File menu, click Import.

Convert GS ImportMenu

  1. Click Upload, and then click Select a file from your device to browse for the file you need.

Convert GS Upload

  1. The name of the file to be imported is displayed under File with the default options available for importing.

Convert GS ShowFile

  1. To change the Import Location, click the drop down under Import Location and choose from the options.

Convert GS CreateNew

  1. To change the delimiter, choose from the drop down under Separator type.

Convert GS Delmiter

  1. Keep Convert text to numbers, dates, and formulas checked, and then click Import Data to import the file into Google Sheets.

AI Formula Generator

Try for Free

See all How-To Articles