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:
- Do one of the following:
- Select Import Format Editor.
- In the Importdialog, click the Import Format Editor button.
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.
- Select a format definition in the list.
- Click Description and Search Type dialog. and select options in the
- Click General Properties dialog. and select options in the
- Click Fields dialog. and select options in the
- 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.
- Click 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:
- Select a custom format in the definition list.
- Click Import Format Editor dialogs. The dialog expands. in any of the four
- 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.
- Click the Browse button and navigate to the type of file you want to import, and click . 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.
- Select a different importer or edit the file to accommodate the reported errors.