SAS export to Excel just got a little bit easier

Note: as this is a popular topic, I've added a few notes with minor updates, including a link to a popular how-to tutorial video.

In case you missed it, the first maintenance release for SAS 9.3 was recently released. Because we're all friends here, you may call it "SAS 9.3M1" for short.

Maintenance releases are usually about fixing problems that SAS has found or that customers have reported. However, sometimes a new capability might sneak out the door along with it. That's what happened this time with improved XLSX support in PROC EXPORT.

Now for the first time, this round-trip import/export cycle works just as you would expect with no additional setup required:

proc export
data=sashelp.prdsale
dbms=xlsx
outfile="c:\temp\prdsale.xlsx"
replace;
run;

proc import
datafile="c:\temp\prdsale.xlsx"
dbms=xlsx
out=work.prdsale
replace;
run;

Watch this tutorial (from SAS instructor Kathy Kiraly) to learn more about how to import and export XLSX files in SAS with just a few lines of code.

Kathy's tutorial includes simple shortcuts, such as using the LIBNAME XLSX engine to read Excel files just like data sets.

Remember: using the IMPORT and EXPORT procedures to read and write Microsoft Excel files requires the SAS/ACCESS to PC Files module. With these latest changes, you can get the job done without setting up a PC Files Server, even on systems that don't have a 32-bit Windows architecture.
Handpicked Related Content: How do I export Excel files, let me count the ways
Prior to this support, most customers who run SAS for 64-bit Windows or on a UNIX platform would need to use DBMS=EXCELCS for this operation. The EXCELCS method works by delegating the Excel read/write operation to another Windows node that has a PC Files Server instance. (On 64-bit Windows, you can make it work with very little configuration using the "autostart" capability.)

The PC Files Server is still very useful for other scenarios, such as supporting the PCFILES LIBNAME engine, which can read and write Microsoft Excel and Microsoft Access files, among others.

And if you're looking for a point-and-click method for creating XLSX files in SAS Enterprise Guide, we cracked that nut a while ago. Just look for the Export as a Step task on your data view, or the "Share" tool in SAS Enterprise Guide 8.1.
WANT MORE GREAT INSIGHTS MONTHLY? | SUBSCRIBE TO THE SAS TECH REPORT