University Libraries

Converting Text Files (like CSV files) to Excel Files

Text tables, such as Monthly Estimate of U.S. Population, can be converted to Excel files by following the steps below. CSV files should open up without requiring the importing described below.

  1. Highlight the table (or part of the table) that you want and copy it.
  2. Paste the copied material into a text file. In a Windows environment, this most likely means into a Notepad file. If the file is very large, you may be prompted to use Wordpad instead.
  3. Name the Notepad file somename.txt and close it.
  4. Open Excel and from inside Excel, open up somename.txt.
  5. Excel will automatically start up a "Text Import Wizard" that has 3 steps.
    1. Tell Excel whether the file is delimited or fixed width. Excel will have one of the choices already clicked and it's usually the right one.
    2. Click "Next" to see if the columns look like they've been separated properly. When they are, click "Next" again.
    3. Decide whether to change the column formats or not import certain columns of information. When you're happy, click "Finish".
    4. Save the file as an Excel file.


Delimited Files: when a character like a comma separates the columns in the table.
Example: County Business Patterns 2007: US

Fixed Width: when the columns are aligned by the spaces between them.
Example: Top 25 American Indian Tribes for the United States: 1990 and 1980

Tip
  • Copy only the columns and headers first and save a working Excel file.
  • Then copy the notes, table name and other documentation into the Excel file.
  • Otherwise, you'll get something like this:


Source:   Population Estimates Program, Population Division,
U.S. Census Bureau, Washington, D.C. 20233


which would be divided into

Source: Population Estimates Program, Popula tion Division,
U.S. Census Bureau, Wash ington, D.C. 202 33