Excel Import CSV: Formula or the Right Import Method

Formulas & functions · Updated November 19, 2026

Excel does not have a built-in worksheet formula that imports a CSV file from your computer. In Microsoft 365 for Windows, use Data > From Text/CSV to bring in the file; formulas are useful afterward to clean or split imported text, not to open the CSV itself.

Why there is no CSV import formula

An Excel formula calculates a result from values available to the workbook. A CSV file is a separate text file, so a normal cell formula cannot browse to a local path, open that file, and load its rows into the sheet. Excel’s import tools do that job by reading the file and placing the resulting data in a worksheet or a query.

This distinction matters because searches for an “Excel import CSV formula” can lead to advice for other spreadsheet products. Google Sheets, for example, has an IMPORTDATA function for web-hosted data. Excel does not offer an equivalent built-in formula for importing an arbitrary CSV file from a computer. Excel’s Power Query feature can connect to a CSV and refresh the imported data, but that is a data connection rather than a cell formula.

Once the CSV contents are in Excel, formulas can work with them. They can extract parts of a text field, standardize values, calculate totals, or combine columns. Keeping the import step separate from the calculation step makes the workbook easier to understand and maintain.

Import a CSV file with Text/CSV

For a one-time import, or when you want to check the file before loading it, use Excel’s built-in text import. In Microsoft 365 for Windows, the usual steps are:

  1. Open the workbook where the data should go, or create a new workbook.
  2. Select Data > From Text/CSV.
  3. Choose the CSV file and select Import.
  4. Review the preview. Check that the delimiter separates the fields into the expected columns and that text appears readable.
  5. Select Load to put the data into a worksheet, or select Transform Data to inspect and adjust it in Power Query first.

Loading directly is convenient when the preview looks right and Excel has interpreted the columns correctly. Transforming first is safer when the file contains dates, product codes, unusual characters, extra spaces, or columns that must remain text. You can also choose where the imported table should appear through the loading options.

On Excel for Mac, the Data tab also provides text and Power Query import options, but the exact labels and availability can vary by Excel version. Look under Data for Get Data or the text/CSV import command. Excel for the web has a different feature set and interface; if you do not see a CSV import or Power Query option there, open the workbook in the desktop app.

When Power Query is a better choice

Power Query is Excel’s data-import and transformation tool. Choose Transform Data from the CSV preview to open the Power Query Editor. There you can remove unwanted columns, filter rows, rename headings, split a column, and set data types before loading the result. These steps are recorded as part of the query, rather than being a set of cell formulas scattered around the sheet.

Power Query is particularly useful when you receive the same kind of file repeatedly. After creating a query, you can replace or update the source file and refresh the query to apply the saved transformation steps again. This is not the same as a formula updating instantly whenever a source file changes: the query must be refreshed, and its connection must still point to an accessible source.

For a recurring import, keep the file in a stable location and avoid changing its name or column structure without checking the query. In Excel for Windows, refresh a selected query or table from Data > Refresh All. If you change the CSV’s headers or remove columns, a saved transformation step that refers to the old layout may need editing.

Check delimiters, encoding, and the preview

CSV means comma-separated values, but files do not always use a comma between fields. Depending on the program or regional settings that created the file, the separator may be a semicolon, tab, or another character. If the preview shows every row as one long field, or splits values into too many columns, check the delimiter setting before loading.

Text inside a quoted CSV field can contain a comma without starting a new column. A proper CSV import tool understands this structure. That is one reason to import the whole file with Excel’s CSV tool or Power Query instead of trying to split every row with a simple formula.

Encoding affects how characters are read. If names or symbols appear as question marks or strange characters, return to the import preview and check the file origin or encoding choice where available. UTF-8 is common, but the right encoding depends on how the file was saved. A preview gives you a chance to catch this before the data is used in reports.

Protect dates, IDs, and long numbers

Excel may interpret CSV fields as dates, numbers, or other types during import. Automatic conversion is convenient for ordinary quantities, but it can damage identifiers. For example, a code such as 00127 may become 127 if Excel treats it as a number. A long account or tracking number may also lose precision if imported as a numeric value; Excel only preserves 15 significant digits for numbers.

If a column is an identifier rather than a quantity, import it as text. In Power Query, select the column and use Transform > Data Type > Text before loading. You can also set the appropriate type for dates and decimal values instead of accepting a conversion that does not match the source. This is especially important when dates may be written in different regional formats, such as day-month-year versus month-day-year.

Formatting a cell as Text after a value has already been converted does not necessarily restore lost leading zeros or digits. Correct the type during import, then verify a few representative values in the loaded table. If the original CSV itself is available, it remains the source to consult when a conversion has altered a value.

Use a formula to split text already in Excel

A formula can split a simple delimiter-separated string after it is in a cell. For example, with the full text Mira,West,12 in cell A2 and the fields separated by commas, Microsoft 365 or Excel 2024 can use =TEXTSPLIT(A2,","). The result spills into neighboring cells as three values: Mira, West, and 12.

TEXTSPLIT is available in Microsoft 365 and Excel 2024; it is not available in every older Excel release. Make sure the cells to the right of the formula are empty, because the result needs room to spill. The output is a split of the text in A2, not a connection to or import from a CSV file.

That example is deliberately simple. A basic split formula does not fully parse CSV quoting rules. For instance, if a field contains a comma inside quotation marks, a plain split at every comma can divide that field incorrectly. Use Excel’s CSV import or Power Query for real CSV files, especially when they contain quoted fields, embedded line breaks, or inconsistent rows.

Common import problems and practical fixes

  • Everything appears in one column: Check the delimiter in the import preview. The file may use semicolons or tabs rather than commas.
  • Leading zeros disappear: Set the relevant column to Text during import instead of allowing numeric conversion.
  • Dates appear swapped or unexpected: Confirm the source’s date order and set the column type deliberately in Power Query.
  • Accented characters look wrong: Check the encoding or file origin option in the import process.
  • Numbers change after import: Treat long identifiers as text, and verify precision-sensitive values against the source.
  • Refresh does not show the new file: Check the query’s source path and refresh it. A query does not automatically discover a renamed or moved file.

It is also worth checking the first few rows and the final rows after loading. A header may have been imported as data, blank lines may exist at the end, or a source file may contain a different number of fields in some records. These are data-quality issues, not formula errors, and are easier to fix before building reports on top of the import.

CSV versus an Excel workbook

CSV is a plain-text format for tabular data. It does not preserve an Excel workbook’s formatting, multiple sheets, charts, data validation, or Power Query definitions. It also cannot store working Excel formulas as formulas in the way an .xlsx workbook can. When Excel saves a sheet as CSV, it exports the sheet’s values in text form; workbook features and other sheets are not carried along.

Use CSV when you need a simple data exchange file that many programs can read. Use .xlsx when you need to keep formulas, formatting, multiple worksheets, or workbook features. A practical workflow is to import the CSV into Excel, transform or analyze it, and save the finished workbook as .xlsx. Keep the original CSV as a separate source file if you may need to repeat the import.

Frequently Asked Questions

What formula imports a CSV file into Excel?
There is no built-in Excel worksheet formula for importing a local CSV file. Use Data > From Text/CSV, or use Power Query when you need repeatable transformations and refreshes.

Can I use TEXTSPLIT to import CSV data?
No. TEXTSPLIT can divide text that is already in a cell, but it does not open a file and is not a full CSV parser. Use the CSV import tool for a file, particularly if fields can contain quoted commas.

How do I import a CSV without losing leading zeros?
In the import workflow, set identifier columns to Text before loading. If Excel has already changed a value such as 00127 to 127, changing the cell format afterward may not recover the original digits.

Can Excel refresh a CSV import?
Yes. If you create the import as a Power Query connection, you can refresh it with Data > Refresh All. The source file must remain available at the path used by the query, and refresh is not the same as a live formula update.

Why does my CSV open with all the data in one column?
The file may use a delimiter other than a comma, or Excel may not have detected the separator you expect. Import through Data > From Text/CSV and choose the delimiter that matches the file.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

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

Spotted an error in this guide? Let us know.