HOME Module List Site Index About This Site glossary" Resources Innovative Technology Center UT Statistics Courses
Using SAS Choose Design ANOVA Compare Means Regression Examples
Using SAS Using SAS: Table of Contents

Accessing data
From Excel

If your dataset is large (more than 100 observations or more than 10 variables), you will most likely want SAS to read your data directly from an external file in which you have it saved. This is easily done if your data are in an Excel spreadhseet.

SAS statements to read the data from an Excel file:

SAS needs to be told two things: a SAS name for the dataset, and the name of the external Excel file. These are accomplished with one SAS statement:

      The PROC IMPORT statement has two options:
           DATAFILE= specifies the name of the Excel file
           OUT=
specifies the SAS dataset name.

      SAS statements always start with a keyword and end with a semicolon.

      In addition, use the REPLACE option to assure that SAS overwrites pre-existing versions of your dataset. Each time you run PROC IMPORT, it will attempt to create the requested dataset. If you do not specify REPLACE, it will not create a new dataset (i.e., it will leave the old copy active). This can cause great confusion, as you correct your dataset and SAS appears to ignore the changes (because the old copy is still being used).

Important points about your data set

\\\2 or 3 Examples (snagits)

Related Topics:                                                                                                     Using SAS: Table of Contents
Overview
From within a SAS program
From Excel
Accessing data from text files
    tab delimited files
    comma delimited files
PROC Import problems

Home | Contact us | Module list & summary | Glossary/Terms | About this site | Stats courses | Links | Index