To import a CSV file into Microsoft Excel for Microsoft 365 on Windows, select Data > From Text/CSV, choose the file, check the preview and import settings, then select Load or Transform Data. Importing this way gives you more control over delimiters, text encoding, and column types than simply opening the file.
What a CSV file contains
CSV stands for comma-separated values. It is a plain-text format for storing rows and columns of data. Despite the name, a CSV file does not always use commas: the separator may be a semicolon, tab, or another character, depending on the program and regional settings that created it. A typical file might contain a header row followed by records such as a customer name, date, and order total.
A CSV stores the values and separators, not the full spreadsheet experience. It does not preserve Excel formulas as working formulas, multiple worksheets, cell colors, column widths, charts, or most other workbook features. Quotation marks can enclose fields that contain separators or line breaks. Excel’s import process reads that structure and places the values into a worksheet grid.
That distinction matters: importing a CSV is not the same as importing a complete Excel workbook. If you need formatting, formulas, or several sheets, ask for an Excel workbook format such as .xlsx when possible. If the source is a CSV, plan to check and format the imported data after it arrives.
Import a CSV with the Data tab
Use this method when you want to inspect the file before Excel loads it, or when dates, codes, separators, or encoding need attention. In Excel for Microsoft 365 on Windows:
- Open a blank workbook, or the workbook where you want the data.
- Select Data > From Text/CSV.
- Browse to the CSV file, select it, and choose Import.
- Review the preview. Set the file origin or encoding and delimiter if the columns or characters look wrong.
- Select Load to bring the data into a worksheet, or select Transform Data to inspect and adjust it in Power Query first.
Excel usually creates a table on a new worksheet when you choose Load. If you need to control where it goes, use the load options available from the import process, such as Load To, when shown. The precise dialog can vary with the workbook and Excel build. Check the result before saving, especially when the data will feed a report or another calculation.
Choose between opening and importing
Double-clicking a CSV or selecting File > Open is convenient for a quick look. Excel opens the file as a worksheet, but it may apply default rules for separators, encoding, and data types without giving you the same opportunity to review the import first. That can be fine for a simple file with familiar values; it is less reliable for identifiers with leading zeros, dates in an unfamiliar format, or text from another language.
Use Data > From Text/CSV when you want to set or check those choices. Choose Transform Data if you need to remove unwanted rows, promote a row to headers, change column types, or split and clean fields before loading. For a one-time, uncomplicated file, opening may be quicker. For repeated imports or data that must be interpreted consistently, the controlled import is usually the better starting point.
On Excel for Mac, menu labels and available import features can differ by version. Look for the text or CSV import option on the Data tab; if it is not available in your build, try File > Open and follow the import prompts. Excel for the web also has different import and transformation capabilities from desktop Excel, so use the desktop application if you need the full Power Query workflow described here.
Check the delimiter and text encoding
The delimiter tells Excel where one column ends and the next begins. In the preview, a correct setting produces separate fields in the expected columns. If every row appears in one column, the selected delimiter may not match the file. For example, a system configured to use semicolons may export a semicolon-delimited file even though its extension is .csv. Choose the actual separator shown in the file rather than relying on the extension.
Encoding controls how characters are represented in the file. If names or symbols appear as question marks, boxes, or garbled characters, check the file-origin or encoding setting in the import preview. UTF-8 is common, but the correct choice depends on how the source system saved the file. If you know the export settings, use that information; otherwise, change the setting and compare the preview before loading.
Quotation marks are part of CSV’s structure, not necessarily characters you want in the finished cell. A field such as a company name containing a comma may be enclosed in quotation marks so the comma is not mistaken for a column break. If the preview splits a quoted field incorrectly, check the delimiter and text qualifier options rather than deleting quotation marks from the file at random.
Protect dates, long numbers, and leading zeros
Excel tries to recognize values, but automatic interpretation can change how a CSV value appears or is stored. A product code such as 004271 may be treated as a number and displayed as 4271. A value like 3-4 may be interpreted as a date, and a very long identifier may lose precision if Excel treats it as a numeric value. These are common reasons to review column types before loading.
In the preview, use the available type-detection choices or select Transform Data to set the relevant column to text before loading. Text is appropriate for identifiers that must retain every character, including leading zeros, and for long codes that are not numbers used in arithmetic. For dates, confirm the source format and choose a matching interpretation; for example, day-month-year can be misread if Excel expects month-day-year.
After import, inspect representative values near the top and farther down the file. A column that looks correct in the first few rows may contain a later value in a different format. If exact source values are important, compare a few imported cells with the original file in a plain-text editor or request a consistent export from the source system.
Use Power Query for repeatable imports
Transform Data opens the Power Query Editor, where you can preview and prepare the CSV before loading it. It is useful when the same kind of file arrives regularly and you want to repeat the same cleanup rather than redo it by hand. Typical steps include removing blank rows, choosing which columns to keep, changing data types, and using the first row as column headers.
Power Query records those preparation steps as a query. For a compatible source, you can later refresh the query to retrieve updated data and apply the recorded transformations again. This is helpful for recurring reports, but it is not a guarantee that every future file will work unchanged: a renamed column, different delimiter, changed folder location, or altered file structure can require edits to the query.
Before loading, review the preview and the query’s applied steps. Then use Home > Close & Load in the Power Query Editor to return the result to Excel. If you need to change the import later, use the workbook’s query tools on the Data tab. Power Query is available in Microsoft 365 desktop Excel, though features and connectors can vary by platform and update channel.
Fix common CSV import problems
- Everything appears in one column: Import again and select the delimiter used by the file, such as comma, semicolon, or tab.
- Characters look corrupted: Change the encoding or file-origin setting and check the preview before loading.
- Leading zeros disappeared: Set the affected column to text during transformation, then import again from the original CSV.
- Dates are reversed or unexpected: Check whether the source uses month-day-year or day-month-year and select a compatible type or locale.
- Some rows have shifted columns: Look for inconsistent separators, unescaped quotation marks, or line breaks embedded in fields. Ask the source system for a clean export if the structure is malformed.
- Values look rounded: The field may have been interpreted as a number. Import identifiers as text; Excel cannot reliably preserve arbitrary precision in long numeric values.
Do not try to repair a damaged import by changing cells one at a time until you know what went wrong. If the underlying CSV is intact, re-importing with the right settings is often safer and faster. Keep an untouched copy of the source file so you can compare it with the worksheet or start over.
Handle CSV files safely and save the right format
A CSV is plain text and does not contain Excel macros, but that does not make every CSV trustworthy. A cell can contain text that spreadsheet software interprets as a formula when opened. Be cautious with files from unknown sources, especially if they contain unexpected content or ask you to enable features. Importing data as text where appropriate and checking suspicious files before working with them can reduce risk; follow your organization’s security guidance for external data.
When you save an imported file, choose the format that matches what you need next. Save as Excel Workbook (.xlsx) to retain worksheets, formatting, and Excel features. Saving as CSV keeps a plain-text data file and generally writes only the active worksheet; workbook-only features are not retained. Excel may show a warning about features that are incompatible with CSV. Read it before confirming, and keep an .xlsx copy if you need to preserve the workbook structure.
Frequently Asked Questions
How do I import a CSV into Excel without losing leading zeros?
Use Data > From Text/CSV, choose Transform Data, and set the identifier column to text before loading. If Excel already removed the zeros, import again from the original CSV; formatting the displayed number afterward cannot restore digits that were discarded.
Why does Excel put my CSV data in one column?
The delimiter selected by Excel probably does not match the one in the file. Import through the Data tab and select the separator shown in the preview, such as a semicolon or tab instead of a comma.
Can Excel import a CSV with dates in day-month-year format?
Yes. Use the import preview or Power Query to check the date column and select an interpretation compatible with the source format or locale. Verify sample dates after loading, because values such as 04/05/2026 can be ambiguous without knowing which part represents the month.
Does importing a CSV preserve formulas and formatting?
No. CSV is a text data format, not a complete Excel workbook format. It can contain text that resembles a formula, but it does not preserve workbook formatting, multiple sheets, charts, or formulas as fully featured Excel elements. Use .xlsx when those features must be retained.
Can I refresh a CSV import after the file changes?
If you created the import as a Power Query connection and the source remains available in the expected location, use the query refresh command on the Data tab. Refresh may need adjustment if the file was moved or its columns and structure changed.
Related
- Excel Shortcut Keys for the Next Sheet in a Workbook
- Excel Named Range Data Validation List: Setup and Fixes
- Excel Named Range in a Drop-Down List: How to Set It Up
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Delete a Page Break in Word: Manual and Automatic BreaksTo delete a manual page break in Word, show formatting marks, click immediately before the line labeled Page…
- How to Clear Cache in New Microsoft Outlook on WindowsTo clear cached app data in New Outlook for Windows, close Outlook, then open Windows Settings and choose…
- How to Switch Back to the Old Outlook View on WindowsTo switch back to the old Outlook on Windows, turn off the New Outlook toggle near the upper-right…
- How to Add an Exchange Shared Mailbox in Outlook 365To add an Exchange shared mailbox in Outlook, first have your Microsoft 365 or Exchange administrator grant your…
- Where to Create Rules in OutlookCreate Outlook rules in the Rules settings for your version: in classic Outlook for Windows, go to Home…
- Google Sheets Filter vs Query: Which Should You Use?Use a regular filter or filter view to temporarily hide rows while you inspect a sheet; use the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.