Technology@ W. P. Carey


Contact Info

Technical Assistance Center
Mon - Fri: 7 am - 9 pm
Sat - Sun: Emergency Only
480-965-2400
wpcarey.support@asu.edu

BIT Survey

Exporting SAS datasets as Access databases and Excel spreadsheets

Exporting to Access

Proc Export can be used to export a SAS dataset to an Access mdb file. This is an example of a SAS program with exports the SAS dataset "testdat" in library "mydat" to the table in "test" in an Access database called "newdat.mdb":

Proc export data=mydat.testdat outtable="test" dbms=access;

database="c:\newdat.mdb";

run;

The "data=" option tell SAS which SS dataset is to be exported. The "database=" command designates which Access database is to be exported to and "outtable=" gives the name of the table in that database to place the data in. 

Exporting to Excel

Proc Export can also be used to export a SAS dataset to an Excel spreadsheet.. The following example converts the same SAS dataset to an Excel spreadsheet called "newdat.xls":

Proc export data=mydat.testdat outfile="c:\newdat.xls";


W. P. Carey Home   |   W. P. Carey Mission   |   Contact Us   |   Web Feedback   |   Sitemap   |   Privacy Policy
Copyright © 2012 ABOR