ASCII .DAT, .TXT, .CSV Data Files

ASCII files are generic format files that can be read or produced by most applications. There are three common ASCII data formats: .DAT, .CSV, and .TXT. ASCII files are generic format files read or produced by most applications. These files can also be imported into most applications, including word processors, spreadsheets, and ASCII editors.

Worksheet Formatting

ASCII files do not contain any worksheet formatting information such as row height, column width, or cell formatting. When ASCII files are loaded into the worksheet, the default column formatting parameters are applied to the data. This does not result in any change to data, but might result in rounding of values in the data display. There is no limitation on the number of rows or columns in an ASCII format. ASCII formats save and load slowly because there is a conversion from binary numbers to character representation.

Format

There are some distinctions in formatting of ASCII files. Here are some brief notes that outline the usefulness of the ASCII file features.

  • Delimiters control the separation between cell entries in a file. Spaces, tabs, semi-colons, or commas can be used to separate cells. If cell entries contain spaces in text, the comma or semi-colon delimiters are necessary if quotes are not used to qualify the text. Otherwise, the text string would be interpreted as two cell entries rather than a single entry.

  • Placing Quotes Around Text - There are two types of entries in an ASCII file, values and text. Values are actual numbers, while text can be any type of character, including numbers and text characters. Single or double quotes can be placed around text strings. If a number should be interpreted as text, surround it with double quotes. When text strings contain spaces, it is recommended to use single or double quotes around text cell entries.

  • Using Commas or Semicolons in Addition to Quotes - Although double quotes are not required around text strings, they are useful when creating a space-delimited file that contains text. Often there are text strings that contain spaces, as in a date containing month name, day and year. With space delimited files this single entry is interpreted as more than one cell when loading this file into the worksheet. The safest way to eliminate this problem is to place double quotes around all text strings and use comma delimiting between variables.

Comma Separated Variables

Comma separated variable .CSV files are comma delimited with double-quotes around text strings (non-numeric or mixed alpha numeric).

When the computer's locale setting has the Decimal separator as comma, .CSV files are imported with commas as the decimal separators and semi-colons as column separators. When the File | Options | User Interface Decimal separator is manually set to comma, .CSV files also import with commas as decimal separators and semi-colons as column separators.

The CSV file format doesn't display import options when importing via the UI or automation. However, if you are using a CSV from a different locale, you can import the CSV as TXT file by changing the file extension for the UI or by setting the "FilterID=txt" in the import options string in automation.

ASCII Text

ASCII text files .TXT are normally tab delimited ASCII text files with no quotes around the text strings. After selecting .TXT as the format, the Data Export Options dialog is displayed.

Golden Software DAT Files

ASCII .DAT files are ASCII files with no set format. Any delimiter or text qualifier can be set. When a file is saved in the .DAT format, the Data Export Options dialog is displayed.

XYZ Points Files (.DAT, .CSV)

See XYZ Points [.CSV, .DAT] File Description

See Also

Data Export Automation Options

Data Export Options Dialog

Data File Formats

Data Import Automation Options

Data Import Options Dialog

Excel XLS Files

File Format Chart

Opening Worksheet Files

Saving Worksheet Files

SYLK SLK Files

XYZ Points [.CSV, .DAT] File Description