Convert CSV files to Excel step by step: complete guide

  • A CSV file is plain text with data separated by a delimiter, usually a comma or semicolon, which Excel can transform into tables.
  • Excel allows you to open and import CSV files with wizards that manage delimiters, encoding, and column types to avoid formatting errors.
  • Power Query and Power Automate make it easy to automate CSV conversion and cleaning, saving time on repetitive processes.
  • Choosing the right separator, encoding, and output format (XLSX) ensures that the data remains intact and ready for analysis.

Converting CSV files to Excel

If you work with data daily, sooner or later you'll come across a CSV file and want to convert it to a neat and organized spreadsheet. Converting a CSV file to Excel step by step isn't complicated, but it does have its tricks to ensure that columns, accents, and numbers are formatted correctly and there are no unpleasant surprises.

In this article you will see all the practical ways to open, import and transform CSV files in Excel (and related Microsoft and Google tools), what to do when the separator is not the classic comma, how to handle headers and how to save the result in XLSX format without losing anything along the way.

What exactly is a CSV file and why does it cause so many problems?

A CSV (Comma Separated Values) file is essentially a plain text file where the data in each row is separated by a character , usually a comma, although a semicolon, a slash, or other delimiters can also be used. There are no formats, colors, or complex formulas: just text and numbers.

This has a clear advantage: CSV files are lightweight, universal, and understood by almost all applications , from databases to automation systems. But it also has a drawback: when you open them as is, you see a string of text that's difficult to read. The fields appear one after the other, separated by commas or semicolons, instead of in neatly organized columns.

In many cases, when opening a CSV file in Excel , all the data is displayed in a single column , or accented characters and special symbols are misaligned. That's why it's so important to use the correct import and conversion options, including choosing the right delimiter and file encoding (such as Unicode UTF-8).

Additionally, keep in mind that the first record in a CSV file typically contains the column names (headers). This is something that Excel, Power Automate, and Power Query can recognize, allowing for easier data handling.

Example of a CSV file in Excel

How to convert a CSV file to Excel by opening it directly

One of the fastest ways to convert from CSV to Excel is to open the CSV file directly from Excel and then transform that text into columns so that it has the typical spreadsheet format (cells in rows and columns).

This method is very useful when you already have the CSV file saved on your computer and want to convert it to an Excel workbook in XLSX format without getting too complicated with advanced import wizards.

Option 1: Open the CSV file from File Explorer and use “Text to Columns”

The first method involves importing the CSV file directly from File Explorer using Excel . The trick is to change the file type to "All Files" so that the CSV appears in the opening window.

Once you locate the CSV file, open it with Excel. Typically, you'll find a block of text that's difficult to read, where all the values ​​are displayed consecutively in a single column and separated by commas (or whatever delimiter the file uses). In other words, no well-organized columns.

In many cases, you'll see that the first row corresponds to the headers (for example, Serial Number, Company Name, etc.) and the following rows contain the data for each record. But everything appears crammed into column A. This makes working with that information very inconvenient.

To format the table, the next step is to select the entire first column of the sheet (where the CSV content is pasted) and use Excel's "Text to Columns" tool. You'll find it on the "Data" tab.

In the "Text to Columns" wizard, select the "Delimited" option , proceed to the next step, and select the correct delimiter (for example, Comma ). Once the wizard is complete, Excel will automatically separate each field into its corresponding column, and you will have a perfectly structured table.

After this process, your data will be organized into columns and rows , ready to be filtered, sorted, have formulas applied, or be formatted as a table. From here, all that remains is to save the file as an Excel workbook (.xlsx) to preserve all your changes.

Option 2: Import the CSV file from a blank sheet

The second option is somewhat more organized from the start, because you begin with a blank spreadsheet and from there you call the CSV file using Excel's data import tools.

In a new sheet, go to the “Data” tab . Within the “Get and Transform Data” section, you will find the “From Text/CSV” option.

Clicking that option will open a window for you to select the CSV file from your computer . Once you've chosen the file, Excel will display a panel with a preview of the data and several options for adjusting how it's interpreted.

In this panel, you can choose the delimiter used by the file (comma, semicolon, tab, etc.), as well as the data type detection and encoding. It's very practical because, while you're choosing the delimiter, you can see how the columns will look at the bottom.

Once everything is set up, you can click "Load" to directly insert the table into the spreadsheet. This will convert the CSV file into a perfectly aligned Excel data range or table with clearly defined columns.

In addition to loading the data as is, you have the "Transform Data" option available , which opens the Power Query Editor. From there, you can make more advanced adjustments before the table is imported into the spreadsheet.

Import CSV with Power Query: Transform data before importing it into Excel

Power Query is a tool included in Excel that allows you to import, clean, and transform data from many sources , including CSV files, databases, web pages, and even cloud services. If you work with large volumes of data, it can save you a lot of time.

When you choose "Transform data" instead of "Load" when importing a CSV file , the Power Query Editor opens. There you'll see the file's data in a table and can apply transformation steps that are automatically recorded.

Among the most common actions is removing rows or columns that you don't need , for example, duplicate headers, auxiliary columns that don't contribute anything, or empty rows that only get in the way of the analysis.

You can also filter information to keep only the relevant data , whether by specific values, date ranges, text containing or excluding certain terms, etc. This is especially useful when the original CSV file is huge and you're only interested in a portion.

Another convenient feature of Power Query is the ability to choose which columns you want to show and which to hide . With just a couple of clicks, you can make your table much cleaner, focusing on what you really need for your reports or analyses.

The "Applied Steps" panel, usually located on the right side of the editor, records all the transformations you make to the data . If you make a mistake or change your mind, you can delete one or more steps, and the table will be automatically recalculated.

Benefits of importing from CSV instead of copying and pasting

Excel and Power Query's import functions allow you to load an entire CSV file at once without having to copy and paste each piece of data individually. This greatly reduces the likelihood of human error.

Furthermore, by correctly converting a CSV file to Excel, you can take advantage of all the spreadsheet's analytical tools : pivot tables, charts, advanced filters, formulas, conditional formatting, and more. A simple text file thus becomes a powerful resource for decision-making.

You can import more than just CSV files. Excel also offers options for linking files and working with external data , such as web pages, other Excel sheets, databases, cloud services like Azure, and many other sources. All of this is integrated into the same "Get and Transform Data" workflow.

This ecosystem makes it possible to build automated reports that update with a single click , drawing from multiple data sources, including the classic CSV files sent by suppliers, customers, or external applications.

If you're interested in taking your skills to the next level, it's always a good idea to train in Excel (from basic to advanced) and in tools like Power Query or macros, especially if your work is closely linked to data analysis or the automation of daily tasks.

Convert CSV files to Excel using Power Automate Desktop

When you frequently need to convert CSV files to Excel, doing it manually over and over can be a real chore. That's where Power Automate Desktop comes in. Microsoft's process automation tool lets you create workflows to automatically open, process, and save files.

One of the strengths of Power Automate Desktop is the ability to work directly with comma- or tab-delimited CSV files , using the "Start Excel" action within the desktop workflows.

Execute the "Start Excel" action in a workflow

To begin, open Power Automate Desktop and start a new desktop flow or edit an existing one . From the actions pane, usually located on the left, you can drag and configure the steps that will make up the automation.

Within the action categories, you'll see a section dedicated to Excel . There you'll find the "Start Excel" action, which you can add to the flow by double-clicking or dragging it onto the designer canvas.

When configuring "Start Excel," you can choose whether to open a visible or background instance of Excel , as well as other options related to how the application is managed during the workflow. Once you have defined the parameters, save the configuration to continue with the design.

The next step is usually to perform another action to open a blank Excel document , where you will end up dumping the content of the CSV file already transformed into a table, using specific actions to write data into cells.

Save the result as an XLSX file using “Close Excel”

Once the CSV data is placed in the spreadsheet using the Power Automate workflow, it's time to save that Excel workbook as an .xlsx file . This is done using the "Close Excel" action.

In the "Close Excel" settings, you can specify that the document should be saved and, very importantly, choose the "Save document as" option . This defines both the name and path of the final file and the output format.

In the format field, you must select “Excel Workbook (.xlsx)” . This ensures that the resulting file is a modern Excel file, with all the formatting capabilities, formulas, and other features of this type of workbook.

In this way, with a well-designed workflow, you can automate the conversion of one or more CSV files to Excel without manual intervention. This is ideal for recurring processes or large volumes of data received daily or weekly.

Convert CSV files to Excel step by step

How to handle semicolon-delimited CSV files in Power Automate

Not all CSV files use the comma as a separator. In many countries and regional settings, the character that separates fields is the semicolon (;) , which can cause problems if a tool assumes that the delimiter will always be the comma.

In Power Automate Desktop, the "Start Excel" action handles CSV files delimited by commas or tabs well , but a different approach may be needed when the file uses a semicolon as a field separator.

To resolve this situation, it is recommended to use the "Read from CSV file" action . This action allows you to explicitly define the separator character being used, which is perfect for the case of semicolons.

When configuring "Read from CSV file", in the advanced options you can select a custom separator . There you simply enter the character ";" to tell the flow that the fields in each row are separated by a semicolon.

Additionally, if the first line of the CSV file contains column names (i.e., headers), there's a specific option called something like "First line contains column names" that you should enable. This way, the resulting data table will already have its headers correctly associated.

After reading the CSV with that configuration, the flow can continue with Excel actions to dump the table into a sheet and save it as .xlsx , as explained in the case of comma-separated files.

Import CSV files into Excel from the File > Import menu

Some versions and configurations of Excel (and also similar environments such as Google Sheets) offer a workflow based on “File > Import” , which guides the user step by step in selecting the file type and import features.

If Excel doesn't interpret a CSV file correctly when you open it, you can create a new workbook, go to File > Import , and choose "CSV File" as the data source. This is a fairly straightforward way to ensure the wizard runs.

In the import wizard, after choosing CSV, you will be asked to select the specific file from the file explorer . When you do this, several screens will appear allowing you to choose how to read each field and how to interpret the characters.

One of the key settings is to select the file type as "Delimited" and specify the file source as "Unicode (UTF-8)." This is crucial if you want Excel to correctly recognize accented characters, tildes, and other special characters, avoiding unusual symbols instead.

In the next step, you choose the primary delimiter , for example, the semicolon. Once selected, the preview will show the columns already separated. You can also configure individual column formats, such as treating certain fields (for example, barcodes) as text so that Excel doesn't modify them or remove leading zeros.

Finally, you can specify whether the data should be inserted into an existing sheet or a new one . Clicking OK will complete the import in Excel, and the CSV file will be converted into a table ready to be used and saved as an Excel workbook.

As you can see, there are many ways to convert a CSV file to Excel step by step without losing any information, both manually and automatically. By understanding delimiter options, proper encoding, and tools like Power Query or Power Automate, it's much easier to avoid problems with mixed columns, incorrectly displayed accents, or disorganized data. And you'll have your tables ready to work with without any headaches.

Import and export Excel data.
Related article:
How to import and export data in Excel step by step

Add as preferred source in Google