CSV File to XLSX: Convert Without Losing Data

How-to basics · Updated November 3, 2026

CSV File to XLSX: Convert Without Losing Data

To convert a CSV file to XLSX in Microsoft Excel for Microsoft 365 on Windows, open the CSV, then choose File > Save As > Browse, select Excel Workbook (*.xlsx) as the file type, and save. If the CSV contains dates, identification numbers, or other values that need careful handling, import it through Data > From Text/CSV first so you can check how Excel reads the columns.

What changes when a CSV becomes an XLSX?

A CSV file stores tabular information as plain text: each line usually represents a row, and separators divide the values in that row. Despite the name, the separator is not always a comma. Depending on the file and regional settings, a CSV-style file may use semicolons or another delimiter. CSV also has no workbook features such as multiple sheets, cell formatting, formulas, charts, or column-width settings.

An XLSX file is an Excel workbook format. When you save a CSV as XLSX, Excel places the imported data into a worksheet and saves it in a format that can retain workbook features. The conversion does not recreate information the CSV never contained. For example, a CSV cannot tell Excel that a column was originally formatted as a date or that a number should display with leading zeros. Excel has to infer how to interpret the text, unless you specify the data type during import.

This distinction matters because a file can look correct at first glance but contain altered values. A product code such as 001274 may become 1274, and a date such as 04/05/2026 may be interpreted differently depending on regional date conventions. Check important columns before saving the converted workbook.

Quick conversion by opening and saving

For a straightforward file whose values Excel displays correctly, opening and saving is the fastest method:

  1. In Excel, select File > Open > Browse and choose the CSV. You can also open it from File Explorer if CSV files are associated with Excel.
  2. Check that the data appears in separate columns and that important values, including dates and codes, look right.
  3. Select File > Save As > Browse.
  4. In the Save as type list, choose Excel Workbook (*.xlsx). Choose a folder and filename, then select Save.
  5. If Excel asks whether to use the workbook format, keep the Excel Workbook option. The saved copy should have an .xlsx extension.

Keep the original CSV if you may need to compare the imported data or repeat the conversion. Saving as XLSX creates a workbook copy; it does not make the CSV itself a richer format. Avoid changing the filename extension from .csv to .xlsx in File Explorer without using Save As. Renaming alone does not convert the file’s contents, so Excel may still treat it as text or report a format mismatch.

On Excel for Mac, use File > Save As and select the Excel Workbook (.xlsx) format in the file-format options. The labels and dialog layout can differ from Windows. Excel for the web can open and save workbooks, but for a CSV that needs careful import choices, the desktop import controls are generally the more useful route.

Import a CSV when column types matter

Use the import command when you need to choose a delimiter, encoding, or column type before the data enters the worksheet. In Excel for Microsoft 365 on Windows, select Data > From Text/CSV, choose the file, and review the preview. Confirm the delimiter separates the fields correctly. If the preview combines the whole row into one column, or splits values at the wrong places, try the delimiter used by the source file rather than accepting the default.

For more control, select Transform Data in the preview window. In the Power Query Editor, review the column headings and data types. Set columns such as postal codes, account IDs, or product codes to Text when their digits must remain exactly as supplied. Set genuinely numeric columns to a number type, and check dates against the format used in the source. When the preview is right, choose Home > Close & Load to put the imported data into Excel. Then save the workbook as an XLSX file.

The import preview is especially helpful for large files because it lets you inspect the interpretation before loading it. It can also reveal that the source uses a particular character encoding. If names or accented characters appear incorrectly, check the file origin or encoding setting in the import process rather than trying to repair every affected cell after loading.

Excel for Mac also offers ways to bring text data into a workbook, but available import options and their labels can vary by release. If you do not see the same controls as on Windows, check the Data tab in your Excel version or open the CSV and verify the result before saving. The underlying goal is the same: confirm the delimiter and protect columns whose values should remain text.

Protect leading zeros, dates, and long numbers

Excel may automatically interpret text that resembles a number, date, or scientific notation. That can be useful for ordinary data, but it can change identifiers that only look numeric. Once Excel has removed leading zeros or rounded a long number, applying a display format later may not restore the original characters. Set the column to Text during import when exact text preservation matters.

  • Postal codes and product IDs: Import as Text if leading zeros are meaningful. A code is not necessarily a quantity you intend to calculate.
  • Dates: Check the order of day and month. For example, 03/04/2026 can mean March 4 or April 3, depending on the source convention and regional settings.
  • Long identifiers: Keep account or tracking numbers as Text if every digit must remain intact. Excel’s numeric precision is limited, so long digit strings should not be treated as ordinary numbers.
  • Decimal values: Check whether the source uses a period or comma as the decimal separator. A mismatch can cause a value to be misread or imported as text.

For example, if a CSV contains a column of six-character inventory codes and one entry is 000482, importing the column as Text preserves 000482. If Excel reads it as a number, it may display 482 instead. Formatting that cell to show six digits can sometimes make it look similar, but the stored value is still numeric; text import preserves the original code as text.

Check the workbook after conversion

Before sharing the XLSX, review a few rows near the beginning, middle, and end of the data. Confirm that the number of columns is sensible, headers are in the expected row, and values have not shifted because of an unexpected delimiter. Spot-check any columns that contain dates, decimal values, leading zeros, or long digit strings.

Also check whether fields containing commas, quotation marks, or line breaks were parsed correctly. CSV files commonly surround a field with quotation marks when it contains a delimiter; a proper import should keep that content together in one cell. If the source file is malformed or uses unusual quoting, the preview may not match the intended table, so do not assume that a successful save means every row was interpreted correctly.

After saving, confirm the filename ends in .xlsx and reopen the workbook if the file is important. Check that the expected worksheet is present and that the data remains intact. You can add formatting, formulas, filters, or additional sheets after conversion; those workbook features can be saved in XLSX, but they will not be written back into a plain CSV in the same way.

Common conversion problems and what to do

  • Everything appears in one column: Reimport with Data > From Text/CSV and select the delimiter that matches the file. A semicolon-delimited file may not split correctly if Excel assumes commas.
  • Characters look garbled: Recheck the encoding or file-origin option during import. The file may have been saved in an encoding different from the one Excel initially assumes.
  • Leading zeros disappeared: Reimport the affected column as Text from the original CSV. Formatting the already-converted number may not recover the original value.
  • Dates changed meaning: Reimport and specify the date interpretation where available, or preserve the source values as text until you can confirm their intended format.
  • The file still opens as CSV: Check that you used Save As and chose Excel Workbook (*.xlsx), not CSV as the save type. Changing only the extension is not a conversion.
  • Some content seems missing: A CSV contains only the plain-text data it stores. It cannot restore formulas, formatting, multiple worksheets, or other workbook details that were not included in the file.

When correcting a conversion, return to the original CSV where possible. Repeatedly saving a wrongly interpreted workbook may preserve the altered values rather than the source values you intended to keep.

Safety and sharing considerations

A CSV is plain text, but values inside it can still be interpreted by spreadsheet software. Treat files from unknown sources cautiously, especially if cells begin with characters that may be used to create formulas. Do not assume that changing the file to XLSX makes untrusted content safe. Verify the source and inspect suspicious data before using or distributing it. CSV files do not contain VBA macros, but a workbook saved as XLSX can still contain active formulas and links to external data.

For sensitive information, consider who will receive the workbook and whether the data should be included at all. Saving as XLSX does not encrypt the file or remove private data automatically. Check the sheets and cells before sharing, and use your organization’s approved storage and sharing settings for confidential material.

When to choose another method

Opening and saving is suitable for a one-time, simple conversion. Use Data > From Text/CSV when you need to control parsing or preserve identifiers. If the same CSV arrives regularly, Power Query can help make the import steps repeatable: after setting the source and transformation choices, you can refresh the query when the data changes, provided the source location and structure remain compatible.

If the recipient specifically requires plain text data, keep or export a CSV copy instead of sending only XLSX. If the recipient needs multiple worksheets, formatting, formulas, or charts, XLSX is usually the more appropriate deliverable. For automated systems, confirm the required delimiter, encoding, column order, and file format with the system owner; an XLSX workbook is not interchangeable with a CSV just because both can display rows and columns.

Frequently Asked Questions

Can I convert a CSV file to XLSX without Excel?
Yes. Spreadsheet applications such as LibreOffice Calc can open CSV files and save them in an Excel workbook format. The menu names differ, so check the saved file type and verify dates, delimiters, and text columns after conversion.

Does converting CSV to XLSX keep the original formatting?
No. A CSV does not store Excel cell formatting, formulas, charts, or multiple sheets. Excel creates a workbook from the plain-text data it can read; formatting must be applied separately.

Why did Excel remove zeros from my CSV?
Excel interpreted the value as a number. Reimport the original CSV and set that column to Text, especially for codes, postal codes, and identifiers. A custom number format may change how a value looks without restoring the original text.

Can I convert a CSV to XLSX online?
Some online spreadsheet services can import CSV and export XLSX, but consider privacy before uploading business or personal data. For sensitive files, use an approved local application or service and check its data-handling rules.

Is changing .csv to .xlsx enough?
No. Renaming changes the filename, not the file structure. Open or import the CSV in a spreadsheet program and use its Save As or export option to create a real XLSX workbook.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.