W. P. Carey School of Business
   

Search:   
   W. P. Carey MBA  |  Undergraduate  |  Executive Ed  |  Departments  |  Directory  |  News  |  Calendars  |  Tools & Resources  |  ASU
Information Technology
Research Computing Tip
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";

run; 

  Web Page Feedback © 2008 Arizona Board of Regents Privacy Statement