Hello all,
here, i want to export all the dataset from work library to an excel file.
Need code for that.
can anyone help me for this?
Thanks in advance.
PROC COPY
data one two three;
set sashelp.class;
run;
libname xl xlsx 'newbook.xlsx';
proc copy in=work out=xl;
run;
libname xl clear;
PROC COPY
data one two three;
set sashelp.class;
run;
libname xl xlsx 'newbook.xlsx';
proc copy in=work out=xl;
run;
libname xl clear;
Guru @data_null__ Very neat. Does that handle exporting to multiple sheets appropriately with the naming convention?
Sorry, I am yet to test that sweet solution. Pardon me.
Yes in this case there are three sheet tabs named one two three.
@novinosrin wrote:
Guru @data_null__ Very neat. Does that handle exporting to multiple sheets appropriately with the naming convention?
Sorry, I am yet to test that sweet solution. Pardon me.
Thank you!
Thanks for reply.
But i want all the datasets at once in one excel workbook having multiple sheets (sheets name must be the dataset name).
Have you tried the code suggested by @data_null__ ? I think it does what you ask.
Vince DelGobbo
SAS R&D
Thank you very much data_null_.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.