Loads a data file from disk.
In the file selector box you can select the name of the file to be read into memory. Together with the spreadsheet data the associated notes are loaded and the options that are also included in the MedCalc data file.
If you want to read a MedCalc data file without erasing existing data in memory, e.g. to combine two files into one, then select the Add file command.
Supported data file types
- MedCalc files (*.mc1)
- Excel files (*.xls, *xlsx, *.xlsm)
- OpenDocument spreadsheet files (*.ods)
- SPSS files (*.sav)
- DBase files (*.dbf)
- Lotus files (*.wk1)
- SYLK (*.slk) and DIF (*.dif) files
- Text files (*.txt, *.csv, *.prn)
When you open a MedCalc data file (which have file extension MC1) MedCalc will lock the open file, preventing other programs and users access to the file. To close and unlock the file, you select the New command.
From time to time the MedCalc file format is revised. MedCalc will automatically convert old files as you open and save them. However, previous MedCalc versions may not be able to read the data files written by some newer versions of the software. It is advised that you always download and install the latest version of MedCalc.
To import an Excel worksheet file, select the file type Excel Worksheet.
If the Excel file contains more than 1 worksheet, then the program will display a dialog box in which you can select the worksheet you want to import.
- MedCalc will convert all formulas in the Excel spreadsheet into their calculated values.
- The import procedure will import data files from Microsoft Excel version 2.1 and higher.
On Windows versions prior to Windows 8 or Windows Server 2012, support for Excel *.xlsx files requires Microsoft .NET Framework 4.0 (a free download from Microsoft).
Note that it is usually faster to open the Excel file in Excel and next copy and paste the data from Excel to MedCalc.
When you open an SPSS data file (with file extension sav), MedCalc will present a Select variables dialog box in which you select the names of the variables to be imported in MedCalc.
The available variables in the file are listed in the box at the left side of the dialog box. If you want to import all variables, i.e. all data in the file, then click the All button. If you do not want to import all variables, then select the names of the variables you require by clicking the variables' names. The names of the selected variables are displayed in reverse. To unselect a selected variable, click it again. Click the None button to cancel all selections.
When you have finished selecting variables, click the OK button.
The file type DBase file must be used when you want to import a database file (with file name extension DBF) created by DBase III+ and compatible programs.
After you have selected the file name in the File selector box, select the names of the fields to be imported in MedCalc using the Select variables dialog box (see SPSS files). After you have finished selecting the variables, click the OK button. When you select the CANCEL button, the procedure will be aborted.
In DBase files missing values are often coded by the maximum value possible in the corresponding field (column). E.g. in a field with a maximum number of characters (field width) of 3, the number 999 will indicate a missing value. The number 9999 will be used to code missing values in a field with width of 4 characters, etc. After you have imported the DBase file, you must check whether this is the case. If it is, you can use the Find & Replace procedure to clear the cells containing these missing values.
E.g. after you have imported the DBase file, you can open the spreadsheet window and inspect the data. When you see any values 999 in a column with a width of 3 characters, then this almost certainly means that missing values for this variable are indeed coded as 999. You can place the cell pointer in the top row of this column, select the Find & replace option in the Data menu, and enter the following in the dialog box:
The Replace with field is left blank because in MedCalc missing values can be indicated by an empty, blank, cell. After clicking the OK button, all 999 codes will be erased in the column.
If missing values in the DBase file were coded with a different number, for example 0, you can take a similar approach, but you will have to be careful not to confuse the genuin 0 values with the missing value code 0.
Lotus files (*.wk1) are data files created by Lotus123 (version 2) and Symphony.
If the Lotus spreadsheet contains formulas that are not supported by MedCalc, then it is recommended that you use the Lotus commands Range Value (/RV) to convert the formulas into values, before you import the file in MedCalc.
MedCalc can also import SYLK (Symbolic Link Format) and DIF (Data Interchange Format) files.
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.
In a delimited text file, the data are separated by commas, and text is placed between single or double quotation marks, e.g.
To read such a file select the Text file type in the dialog box and next you select the file name. The program will first 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 click the OK button to proceed.
Finally, you will have to select the variables to be imported in the Select variables dialog box (see SPSS files). If no name is available for a particular variable in the test file, then MedCalc will give the name FIELDxx to the variables, where xx is the number of the field (or variable) in the file.