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!!!