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;