

In the dialog box that opens, you can either type the filename that you wish to import or Browse… to the location of the file.ĭouble-click on the name of the file, and click on Open. Select the type of data file that you would like to import from the pull-down menu, and click on "Next". Go to the File Menu and select Import Data… Step-By-Step Instructions Using the Import Wizard: XLXS files, cannot be opened automatically by SAS, and will have to be saved as an earlier (. Excel 2000), but only one worksheet at a time. You can also import individual worksheets from workbooks for later versions of Excel (e.g. You can import Excel worksheets, starting with very early versions of Excel (e.g., Excel version 4.0). If you have an Excel Workbook, you need to import each sheet separately, and then merge them in SAS, if necessary. xls extension.Ī document very similar to this one is available online at

To recognize the file as an Excel file, SAS will need it to have the. To preserve your original Excel data, be sure to save the file using a different name. You will be able to save only one worksheet at a time in Excel 4.0 format. and then select Excel 4.0 Worksheet (not Workbook) as the file type. To save your Excel file in version 4.0, go to the File menu and choose Save As. If you are experiencing trouble, you can try to save each spreadsheet as an Excel Version 4.0 Worksheet. XLS file before you can read it into SAS. If you have Excel 7.0, you need to save the file as an. Save the spreadsheet with values only, not formulas.ĭo not underline text, or use boldface or italics.Ī suitable excerpt from an Excel data sheet might look like this: Be sure the value you use to indicate missingness cannot be confused with a "real" data value. If you have missing values, you can indicate them with a numeric code, such as -1, 99 or 999, or you can leave the cell blank. You can change them into date values in your statistics package later. Use numeric values when feasible.ĭate values are best entered in three columns: one for month, one for day, one for year. While character variables are allowed in statistical packages, they are not as flexible as numeric variables, which are preferred. names and ID numbers) in the same column. Include a separate column for each answer.ĭon't leave blank rows or columns in the data.ĭon’t mix numeric and character values (e.g. Don't enter data as "A,C,D" or "BDF" if there are three possible answers to a question. Enter systolic blood pressure as one variable, and diastolic blood pressure as another variable. Don’t enter data such as "120/80" for blood pressure. If you have several spreadsheets containing data on the same individuals, include their identifier(s) on each sheet. Sometimes you may have more than one identifier, such as Household ID and Subject ID place these in separate columns. Include a unique identifying number for each case. To prevent "ghost" rows and columns, copy only the raw data onto a new worksheet, and save from there. Delete extraneous data in your Excel file, like row or column totals, graphs, comments, annotations, etc. Only include the raw, un-summarized data. ,-.īe sure that each variable name is unique (no duplicate variable names)īe sure variable names are on the first row only! Variable names may only have letters, numbers, or underscores in themĭo not use following characters in variable names. Variable names can be no more than 8 characters long Place the variable names in the first row. Preparing Data for a Statistics Package: From Excel
