BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ShuShen
Calcite | Level 5
How to export sashelp.class to Excel 4 spreadsheet (Microsoft Excel 4 Spreadsheet)?
1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18

Try next steps:

1) Open a new empty excel file with 4 sheets: shhet1-sheet4.

2) Adapt next code:

libname myxl excel "<path to the excel file>/filename.xlsx" replace;

data myxl.sheet1 myxl.sheet2 myxl.sheet3 myxl.sheet4;
 set sashelp.class;
       if <condition1> then output myxl.sheet1; else
       if <condition2> then output myxl.sheet2; else
       if <condition3> then output myxl.sheet3; else
       if <condition4> then output myxl.sheet4; 
run;

View solution in original post

2 REPLIES 2
Shmuel
Garnet | Level 18

Try next steps:

1) Open a new empty excel file with 4 sheets: shhet1-sheet4.

2) Adapt next code:

libname myxl excel "<path to the excel file>/filename.xlsx" replace;

data myxl.sheet1 myxl.sheet2 myxl.sheet3 myxl.sheet4;
 set sashelp.class;
       if <condition1> then output myxl.sheet1; else
       if <condition2> then output myxl.sheet2; else
       if <condition3> then output myxl.sheet3; else
       if <condition4> then output myxl.sheet4; 
run;
ShuShen
Calcite | Level 5
Thank you so much!!!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 959 views
  • 1 like
  • 2 in conversation