O'Reilly logo

SAS 9.4 Language Reference, 6th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exporting a Subset of Data
Overview of Exporting Data
The Export Wizard reads data from a SAS data set and writes it to an external file. You
can export SAS data to a variety of formats. The formats that are available depend on
your operating environment and the SAS products that you have installed.
Export Data
To export data, follow these steps:
1. With the Explorer window active, select File ð Export Data.
The Export Wizard - Select library and member window appears.
2. Select the SAS data set from which you want to export data.
In this example, Sashelp is selected as the library, and Cars is the member name.
3. Click Next and the Export Wizard - Select export type window appears.
4. Select the type of data source to which you want to export files.
Exporting a Subset of Data 393
In this example, Microsoft Excel Workbook is selected. Note that Standard data
source is selected by default.
5. Click Next to display the Connect to MS Excel window.
6. In the Workbook field, enter the name of the workbook that will contain the
exported file and then click OK.
In this example, Myworkbook is entered as the name of the workbook.
7. When the Export Wizard - Select table window appears, enter a name for the table
that you are exporting.
394 Chapter 17 Managing Your Data in the SAS Windowing Environment
In this example, Mytable is the table name.
8. Click Next.
9. If you want SAS to create a file of PROC EXPORT statements for later use, then
enter the name of the file that will contain the SAS statements.
In this example, PROC EXPORT statements are saved to the file. The Replace file if
it exists box is checked.
10. Click Finish to complete this task.
Exporting a Subset of Data 395

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required