Excel Import CSV Into Template: Steps and Tips

How-to basics · Updated November 19, 2026

To import a CSV into an Excel template, first open the template, then select Data > Get Data > From File > From Text/CSV, choose the file, check the preview, and load it to a safe blank area or a staging sheet. A CSV import does not automatically match columns to your template, so check the headers and field order before putting imported values into the template’s input cells.

What importing a CSV into a template means

A CSV file is plain text arranged in rows and columns. It can store values and delimiters, but it does not preserve Excel formatting, formulas, multiple worksheets, charts, or other workbook features. An Excel template, by contrast, may include styled headings, formulas, validation lists, protected cells, and a particular arrangement of input fields.

Importing the CSV therefore means bringing its data into the workbook and placing it where the template expects it. Excel will not infer that a CSV column called Customer ID belongs in a template column called Account Number, for example. Nor will it know that a template’s first three columns are instructions rather than data fields. The user must verify how the two layouts correspond.

For a one-time import, opening the CSV and copying the relevant values into the template can be straightforward. For repeated imports, Power Query is usually more dependable because it can save the connection and repeat the same transformations when you refresh the data.

Recommended workflow using Power Query

On Excel for Microsoft 365 for Windows, the usual route is to open the template first and use its Data tab to import the CSV. Importing from inside the template makes it easier to keep the source data and the intended output workbook together. Use a staging worksheet rather than loading over the template’s existing headings, formulas, or formatted cells.

  1. Save a copy of the template under a new name. Keep an untouched original in case you need to start over.
  2. Open the copy, then choose Data > Get Data > From File > From Text/CSV.
  3. Select the CSV file. In the preview, confirm that the columns are separated correctly and that the first row is being treated as headers if it contains field names.
  4. Select Transform Data if you need to check or change column types, remove unwanted rows, or rename columns. If the preview is already correct, select Load.
  5. To control the destination, use the load options and choose an existing worksheet location on a blank staging sheet, or load the results to a new worksheet. In Power Query Editor, the route is Home > Close & Load > Close & Load To.
  6. Compare the imported headers and sample records with the template’s input fields. Move or map values into the template only after confirming which fields correspond.

Loading a query to an existing worksheet means placing its result table at a chosen starting cell. It does not mean Excel will distribute fields into matching template columns by name. Leave enough empty space for the query output to expand, and do not place it over formulas or other content you need to preserve.

Choose a method for the way you work

The best method depends on whether this is a one-off task or a repeatable process, and on how much the CSV differs from the template.

  • Power Query: Choose this for recurring files, large datasets, or predictable cleanup such as renaming columns and removing blank rows. The query keeps its import steps so you can refresh it with updated source data.
  • Open and copy: For a small, one-time CSV, open the file in Excel, check the columns, and copy only the needed data into the template. Paste into the matching input cells, not over formulas or instructions.
  • Paste values: If copying from another workbook, use Paste Special and choose Values when you want data without source formatting or formulas. On Windows, Ctrl+Alt+V opens Paste Special; the available shortcuts and dialogs can differ on Mac.
  • Open the CSV directly: This is useful for inspecting the file, but it opens the CSV as a separate workbook. It does not import the data into a template automatically. Copy the required data into the template after checking its layout.

For a template that has formulas beside its input area, keep imported data in a separate worksheet or table and have the template reference that data. This separation makes it less likely that a refresh or a paste will overwrite the template’s calculations.

Match CSV fields to template columns

Before moving data, compare the two header rows. A simple mapping list can prevent mistakes when the names or order differ. For example, a CSV might contain Client, Invoice Date, and Net Amount, while the template expects Customer Name, Date, and Amount Before Tax. Those names may describe corresponding fields, but confirm what each field actually means before mapping them.

Check for differences in units and meaning as well as labels. A CSV may report amounts in cents while the template expects dollars, or it may contain a full name where the template has separate first-name and last-name columns. Do not assume that a similar-looking field is interchangeable. If a required template field has no corresponding CSV column, find out whether it should remain blank, be entered manually, or be supplied from another source.

When the CSV columns are in a different order, do not rely on position alone. Power Query can help you rename, reorder, and remove columns in the query before loading. For a manual copy, select only the intended columns and check a few rows after pasting. A deliberate mapping is especially important when the template will be used for reporting, invoicing, or later analysis.

Check delimiters, encoding, and data types

CSV is a general name for delimited text, and not every file uses a comma as the separator. Regional settings or the program that created the file may produce semicolons or tabs instead. If the preview shows one long column, or splits names and addresses into unexpected pieces, inspect the delimiter setting in the import preview and choose the separator that matches the file.

Text encoding affects whether accented letters and symbols display correctly. If names appear as garbled characters, try another encoding in the preview’s file-origin setting rather than editing the damaged text after loading. A UTF-8 CSV is common, but the correct choice depends on how the file was saved.

Pay particular attention to identifiers and dates. Excel may interpret a value such as 00127 as the number 127, removing leading zeros that are significant in an account code or postal code. In Power Query, set such a column to Text before loading. A date such as 04/05/2026 can also be ambiguous: it may mean April 5 or May 4 depending on the source’s date convention. Confirm the source format and choose a suitable data type and locale where needed.

Once Excel has converted a value, changing the cell’s display format may not restore the original text. If a code has lost leading zeros, reimport the source and set that column to Text during import. Keeping an untouched copy of the original CSV makes it easier to correct type-conversion problems.

Make recurring imports easier to refresh

Power Query is useful when you receive a new CSV on a regular schedule and its structure stays reasonably consistent. During the initial import, you can remove unnecessary columns, filter out unwanted rows, promote the correct header row, and rename fields. When the source file is updated, use Data > Refresh All to rerun the saved query.

For a refresh to work smoothly, the replacement CSV should have the same expected column names and a compatible structure. If someone changes a header, removes a field, or changes the delimiter, a query step may fail or return unexpected results. Keep a record of the expected file layout and check the result after refreshing, especially before sharing a report or using the data for decisions.

If each reporting period arrives as a separate file, Power Query can also combine files from a folder, provided they follow a consistent format. This is a more advanced setup than importing one file: the files should have matching columns and compatible data types. If the folder contains unrelated files or old versions, filter those out so they are not included in the combined result.

Common problems and how to avoid them

  • Data appears in one column: Reopen the import preview and select the correct delimiter. Commas inside quoted text should remain part of the field, not split it into extra columns.
  • Values land under the wrong headings: Compare field names and order before loading into the template. A CSV import does not automatically match fields by meaning.
  • Leading zeros disappear: Import the affected column as Text. Formatting a number as text afterward may not recreate zeros that Excel already discarded.
  • Dates switch day and month: Confirm the source’s date convention and interpret the column using the correct locale or format during import.
  • Template formulas or styles disappear: Avoid loading or pasting over the formatted template area. Use a staging sheet, then transfer only the input values.
  • Refresh adds unexpected records: Check that the query points to the intended file or folder and that the source has not accumulated old rows or duplicate records.

Also check row counts and a few representative records after import. Compare the first and last rows, any unusual text, and totals that matter to your process. A file can load without an error while still having a shifted column, a misread date, or a missing category.

CSV versus Excel workbooks

CSV is a practical interchange format because many systems can create and read it. It is also limited: a CSV contains one plain-text table and does not save Excel’s formatting, formulas, multiple sheets, or query definitions. Save the completed template as an Excel workbook, usually .xlsx, if you need to retain those features.

Use the CSV as the source and the workbook as the working document. Do not expect saving a workbook back as CSV to preserve the template; CSV saves only the active sheet’s displayed values and prompts about features that the format cannot keep. Keep the Excel template or final workbook in .xlsx format when its structure and calculations matter.

Frequently Asked Questions

Can I import a CSV directly into an existing Excel template?
Yes. Open the template and use Data > Get Data > From File > From Text/CSV. Load the query to a blank location or staging sheet, then map the fields to the template. Excel does not automatically fit the CSV into the template’s intended fields.

How do I import a CSV without changing the template formatting?
Keep the imported data outside the formatted area, such as on a separate worksheet. Then copy only the required values into the template’s input cells. Avoid pasting over cells that contain formulas, formatting, validation, or instructions.

Can I refresh a CSV import when the file changes?
Yes, if you import it as a Power Query connection. Keep the source file in the expected location and choose Data > Refresh All. If the file’s name, columns, or structure changes, review the query and verify the refreshed results.

Why does Excel remove zeros from my CSV codes?
Excel may interpret codes as numbers. Import the column as Text in Power Query so values such as 00127 remain intact. If the zeros were already removed, reimport the original CSV rather than relying on number formatting to reconstruct them.

Can I do this in Excel for Mac?
Power Query is available in Microsoft 365 for Mac, but the available connectors and menu wording can vary by update. Look under Data for Get Data or Power Query and choose the text/CSV source if available. If that option is not present, open the CSV separately, verify its layout, and copy the needed values into the template.

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.