Import Data in a Custom Format

Use the Import Format Editor to define a custom format for importing an ASCII file with a non-standard format. The importers created with this editor are used within the Import command.

You can create a converter to import any of the following:

  • Delimited files containing ASCII data that is separated by a specific character, e.g. comma separated (.csv) files
  • Fixed-width files containing ASCII data that is in pre-defined columns
  • Files with ASCII data that is defined by a string of text
  • Files with ASCII data that can be defined by a regular expression

To import a file with a custom format:

  1. Do one of the following:

    The Import Format Editor opens and displays the Select Definition dialog.

    Note: If you try to import an ASCII file with a format that is not recognized by any importers, the Import Format Editor may display automatically.

  2. Select a format definition in the list.
  3. Click Next and select options in the Description and Search Type dialog.
  4. Click Next and select options in the General Properties dialog.
  5. Click Next and select options in the Fields dialog.
  6. If you selected Regular expression as the type in the Description and Search Type dialog, click Next and select options in the Regular Expressions dialog.
  7. Click Finish to import the file using the customized importer.

Tip: For each format type, you can select to show or not show the Import Format Editor automatically, every time you import an ASCII non-standard file. Set this option in the Select general properties dialog of the editor. When checked, the Test section displays the actual contents of the file and a sample of how it will be parsed using the selected format. For details, see Fields Options.

To test a custom format importer:

  1. Select a custom format in the definition list.
  2. Click Test in any of the four Import Format Editor dialogs. The dialog expands.
  3. Click Read File and select the number of lines you want the importer to read. If you select View File, it will open in a text editor.
  4. Click the Browse button and navigate to the type of file you want to import, and click Open. The importer will read the file and highlight any values that it is unable to convert.

    Note: The file must have the same file extension as the importer you chose.

  5. Select a different importer or edit the file to accommodate the reported errors.

Related topics

Definition Options

Description and Search Type Options

General Properties Options

Fields Options

Import Data Formats

Reference: Regular Expressions