To Open a Text File
Use the File > Open command and choose Text from the File of type list,
or drag and drop a given text file into the main GS-Base window.
Next, specify additional text file options:
| Field separator | A single character used to separate fields in one line. |
| Fixed field widths | A list of fixed field width values. For example: 10,30,15,40 If not all widths are specified, the remaining fields are assumed to contain 1024 characters. |
| Quoting symbol |
A symbol used to delimit fields containing separator characters. |
| Encoding | Specifies the text encoding for a given text file: UTF-8, UTF-16, ANSI 8-bit, ISO/OEM. The initial value is set based on the file's initial bytes. |
| First row contains field names | Specifies whether text strings from the first line of the file should be treated as field names. If you clear this option when reading a text file, GS-Base will use simple "field_nnnn" names. A field name must begin with a letter. |
| Convert text to numbers |
If you check this option, a column containing only
text strings that can be converted to numbers (without formatting) will be
treated as a numeric database field. Otherwise all such columns will be imported
as text fields (and will be sorted and searched as plain text fields). You can also change the field type after you import the file using the Database > Field Properties command. If automatic field type checking is selected, a given file is scanned twice, with the first pass to make sure there are no conflicts between a given field type and the data. |
| Convert text to dates |
If you check this option, text strings representing dates in one
of the local system formats will be converted to generic date/time strings. As selecting this option may significantly slow down opening a text file, it's recommended that you use the Edit > Convert Field Data > Text To Standard Date String command instead (for selected fields, after the file is opened). If automatic field type checking is selected, a given file is scanned twice, with the first pass to make sure there are no conflicts between a given field type and the data. |
| Set Filter |
As GS-Base loads files to RAM, to enable processing data from CSV/text files of any size, also for
computers with insufficient memory, you can now specify Text File Input Filters to limit the size
of the loaded data. Only filtered records will be loaded from a given file. Filters can use RegEx patterns, the popular relations, ranges of values and fuzzy filters. |
Note: When changing most of the options, you need to click the Reload Fields button to show the number and names of the detected fields.

To Save a Text File
Use the File > Save Recordset As command and choose Text from the File of type list. Next, specify the same additional text file options as above, and the following ones:
| Save 'Image/File' objects to a zip file Save 'Long Text' field contents to a zip file |
If you check this option (or these options), the contents of GS-Base binary Image/File and
Long Text fields will be saved
to an additional zip file named some_text_file/r[record_number]\f[field_number] (e.g. some_text_file/r00000002f00003\text.txt) If you re-import the Note that, depending on your database size, the above may result in creating a zip file with a very large number of streams/files, and native Windows tools (e.g. File Explorer) will require a lot of time to unzip it. Leaving this option unchecked results in saving the text file only with labels describing the binary contents. |
Note: When saving a text file, GS-Base 14.5.3 and earlier versions save only filtered records from the active table, and GS-Base 14.7 and later versions save the whole table using the default (unsorted) record order. To save only the current filtered and sorted record set, you have to use the Save Recordset As command.
To automatically resize the column widths to fit the field contents in the opened file, select the Options > General > Auto-fit column widths in imported files option. Keep in mind that for very large files this may slow down the import process. To optimize the resizing, in the Options > General dialog box, increase the declared number of processor cores that GS-Base can use.
Related Topics
Saving PDF files
Opening and saving HTML files
Opening and saving xBase files
Opening and saving Excel workbooks