![]() Chapter Contents |
![]() Previous |
![]() Next |
| The EXPORT Procedure |
| Featured in: | All examples |
|
PROC EXPORT DATA=SAS-data-set
OUTFILE=filename| OUTTABLE=table-name <DBMS=identifier> <REPLACE>; |
| Required Arguments |
| Featured in: | All examples |
| Featured in | Exporting a Delimited External File and Exporting to an Excel Spreadsheet |
| Requirement: | When you export a DBMS table, you must specify the DBMS= option. |
| Featured in: | Exporting a Microsoft Access Table |
| Options |
To export a DBMS table, you must specify DBMS= using a valid database product. For example, DBMS=ACCESS exports a Microsoft Access table.
If you do not specify an identifier or if the extension of the filename is not recognized, an error is returned.
The DBMS= specification can include the values listed in the following table:
| Identifier | Output Data Source | Extension |
|---|---|---|
| ACCESS | Microsoft Access database | .MDB |
| DBF | dBASE files | .DBF |
| WK1 | Lotus 1 spreadsheet | .WK1 |
| WK3 | Lotus 3 spreadsheet | .WK3 |
| WK4 | Lotus 4 spreadsheet | .WK4 |
| EXCEL | Excel Version 5 spreadsheet | .XLS |
| EXCEL4 | Excel Version 4 spreadsheet | .XLS |
| EXCEL5 | Excel Version 5 spreadsheet | .XLS |
| EXCEL97 | Excel 97 spreadsheet | .XLS |
| DLM | delimited file (default delimiter is a blank) | .* |
| CSV | delimited file (comma-separated values) | .CSV |
| TAB | delimited file (tab-delimited values) | .TXT |
| Restriction: | The data sources available to you depend on which SAS/ACCESS products you have licensed. If you do not have any SAS/ACCESS products licensed, then the only type of data source files available to you are .CSV, .TXT, and delimited files. |
| Restriction: | The OS/2 operating environment does not support Excel 5 and Excel 97 spreadsheets. |
| Comparison: | When you specify DBMS=EXCEL
|
| Featured in: | Exporting a Delimited External File and Exporting a Microsoft Access Table |
Note: If you export a SAS data set that contains missing values (for
either character or numeric values) to a dBASE file (DBF), the missing values
are translated to blanks. ![[cautionend]](../common/images/cautend.gif)
| Featured in: | Exporting a Microsoft Access Table |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.