Import or export text files

There are two commonly used text file formats:

  • Delimited text files, in which the Tab character usually separates each field of text.
  • Comma separated values (CSV) text files, in which the comma character (,) usually separates each field of text.
What do you want to do?


Import a text file

You can convert a text file created from another program to a Microsoft Excel file by using the Open command (on the File menu) in Excel. When you open a file, Excel converts the file automatically.

You can also import a text file with the Import Data command (Get External Data submenu on the Data menu). When you import a text file, Excel displays the Text Import Wizard, which provides additional flexibility and options for deciding how to import the text file, and then converts the file. For more information, see the Help topic, Import a text file.

Once you import the text file, you may want to change the decisions you made in the Text Import Wizard. For more information, see Change how an imported text file looks.

Top of Page Top of Page

Export a text file

You can convert from a Microsoft Excel file to a text file by using the Save As command (on the File menu) in Excel. For more information, see the Help topic, Save a workbook in another file format.

Top of Page Top of Page

About text converters

For all text file formats, Excel converts only the active sheet. To convert the other sheets, switch to each sheet and save it separately.

Whether you are importing or exporting, you may want to learn more about these text converters. For more information, see the following:

If you have problems converting to and from text file formats, see the Help topic, Troubleshoot converting file formats for more information and possible solutions.

Top of Page Top of Page

Change the separator character

You can change the separator character used in both delimited text files and comma separated values (CSV) text files.

Change the delimiter in a delimited text file

For a delimited text file, you can change the delimiter from a Tab character to another character in the second page of the Text Import Wizard. From the same wizard page, you can also change the way consecutive delimiters, such as consecutive quotes, are handled.

Change the separator in a CSV text file

  1. Click the Windows Start menu.
  2. Click Control Panel.
  3. Open the Regional and Language Options dialog box.
  4. Click the Regional Options Tab.
  5. Click Customize.
  6. Type a new separator in the List separator box.
  7. Click OK twice.

 Note    After you change the list separator character for your machine, all applications will use the new character. You can change the character back to the original character by using the same procedure.

Top of Page Top of Page

 
 
Applies to:
Excel 2003