Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The Data Table

Opening Local Files

The Analyst Application supports many different file formats, including SAS data sets, Excel spreadsheets, Lotus spreadsheets, SPSS portable files, and delimited files. You can open data files from your operating system's directories or folders and bring them into the data table by selecting File arrow Open ...

c0201b.gif (8503 bytes)

Figure 2.2: Open Dialog

In the Open dialog, select a file and click Open to bring the contents of the file into the data table. Non-SAS files opened into Analyst are converted into SAS data sets. The source files are not altered.

Opening Microsoft Excel Spreadsheets

The Analyst Application enables you to open spreadsheets from many Excel formats including Excel 4, Excel 5, Excel 7, and Excel 97. To bring a Microsoft Excel spreadsheet into the data table, you must ensure that rows correspond to observations and that columns correspond to variables. In addition, you can include variable names in the first row of the spreadsheet.

To open a Microsoft Excel spreadsheet in Analyst, follow these steps:

  1. Select File arrow Open ...
  2. Click on the arrow next to Files of type: and select Microsoft Excel Spreadsheet from the list.


    c0203.gif (5905 bytes)

    Figure 2.3: Open Dialog with Microsoft Excel Spreadsheet Selected

  3. Go to the directory in which the spreadsheet is stored, select the file, and click Open.

    c0204.gif (2183 bytes)

    Figure 2.4: SAS Import: Spreadsheet Options Window

    Figure 2.4 displays the SAS Import: Spreadsheet Options window. You can select from a list of worksheets and named ranges. Named ranges are predefined names that represent a range, such as a range of cells. The Column names in first row option indicates that the first row of the spreadsheet contains column names.

  4. Click on the arrow next to Worksheet/Range: and select the worksheet or named range.
  5. If the first row of the spreadsheet does not contain variable names, deselect Column names in first row.
  6. Click OK to open the spreadsheet into the data table.

c0205.gif (14757 bytes)

Figure 2.5: Data Table with Data from a Microsoft Excel Spreadsheet

Opening Delimited Files

The Analyst Application also provides access to data contained in delimited text files. Text files typically contain variable names on the first line and observations on following lines. Each variable name and data value is separated by a comma, semicolon, tab, or other delimiter. Figure 2.6 displays a text file that contains data with values separated by commas.

c0206.gif (3642 bytes)

Figure 2.6: Delimited File with Comma-Separated Values

To open data from a text file, follow these steps:

  1. Select File arrow Open ...
  2. Click on the arrow next to Files of type: and select Delimited File from the list.
  3. Go to the directory in which the text file is stored, select the file, and click Open.

    Once you have selected a text file to open, you can specify how the file is delimited in the SAS Import: Delimited File Options window.

    c0207.gif (3090 bytes)

    Figure 2.7: Delimited File Options Window

  4. Select the type of delimiter in the Delimiter box. If the text file is not space- or tab-delimited, you can specify a custom delimiter such as the comma, colon, or semicolon by selecting Character and typing the delimiter in the field.
  5. Specify the row number that contains the first row of data. The default row number is 2, which is appropriate for files that contain variable names in the first row.
  6. Select Get variable names from first row if the first row of the file contains variable names.
  7. Click OK to open the data into the data table.

Opening SPSS Portable Files

To open an SPSS portable file into Analyst, follow these steps:

  1. Select File arrow Open ...
  2. Click on the arrow next to Files of type: and select SPSS File from the list.
  3. Go to the directory in which the SPSS file is stored and select the file.
  4. Click Open to open the data into the data table.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.