PROC Export

PROC Export to Excel – Multiple tables to one xlsx file on different sheets

The XLSX engine is enhanced to write multiple sheets per Microsoft Excel file in the first maintenance release of SAS 9.3.

In SAS 9.3, the XLSX engine supports writing only one sheet in an Excel workbook. You can work around this by setting DBMS=EXCEL or DBMS=EXCELCS in your code. This will generate more than one sheet

In the SAS 9.3 TS1M1 maintenance release, the XLSX engine capability has been enhanced to write multiple sheets per Excel file.

E.g.

   OUTFILE = “C:\User1\Document\myfile.xlsx’

   DBMS =xlsx replace;

   SHEET=“Summary1”;

   PROC EXPORT DATA = WORK.Summary

   OUTFILE = “C:\User1\Document\myfile.xlsx

   DBMS =xlsx replace;

   SHEET=“Summary2”;

   RUN:

RELATED POSTS

The Complete Guide to SAS Arrays

Are you looking to become a more efficient Data Step programmer? Do you often needRead More

PROC SQL: Using SAS

INSTRUCTIONS FOR CREATING TABLES AND USING CODE EXAMPLES Create the tables using the DATA stepsRead More

  • Top 10 Most Powerful Functions for PROC SQL
  • PROC IMPORT
  • Automatically assign libraries at startup
  • SAS Shortcuts