Import text file
When you want to import data from other applications than Lotus123 or DBase, use the formatted text or
delimited text file format. In a text file, one text line contains data on one case, and every text line ends
with a carriage return character (ASCII code 13).
In a formatted text file, the different fields (variables) are separated by spaces so that, when the file is
opened with a text editor (such as Notepad), the variables appear as distinct columns, e.g.
LENGTH WEIGHT
171
66
174 61.5
182
82
172
80
179 72.0
177 78.50
In a delimited text file, the data are separated by commas, and text is placed between single or double
quotation marks, e.g.
LENGTH , WEIGHT
171,66
174,61.5
182,82
172,80
179,72.0
177,78.50
To read such a file select the Text file type in the dialog box and next you select the file name. The
program will now check the text file to determine whether it is a formatted or delimited text file. The result
is displayed in a new dialog box.
You must confirm the file type by clicking the
OK
button. If the program would have selected the wrong file
format, you can choose the correct file format by selecting the corresponding button. Next select the
OK
button to proceed. If you select
C
ANCEL
, the Import text file procedure will be abandoned.
Finally, you will have to select the fields or variables to be imported in the Select variables dialog box (see
Import SPSS file). If no name is available for a particular variable in the text file, then MedCalc will give the
name FIELDxx to the variables, where xx is the number of the field (or variable) in the file.
Export
Shortcut: F10
The Export command is used to export the contents of the top window. The top window can either be the
spreadsheet data window and then the data can be exported as a plain text file.
If the top window is a statistics results window, these results can be exported as a text file. Finally, when
the top window is a graph window, the graph can be exported as a Windows metafile.
21
New Page 1