Hi all,
I am using sas enterprise guide 5.1 version with MS Office-2010.
I want to export two datasets into excel with 2 different sheets, I tried proc export
proc export data=dataset1 outfile="filename.xlsx"
dbms=xlsx
replace;
sheet="salaries";
run;
proc export data=dataset2 outfile="filename.xlsx"
dbms=xlsx
replace;
sheet="department";
run;
After this i am keeping this file in zip file and sending automailer.
ods package(Accounts) open nopf;
ods package(Accounts) add file="filaname.xls";
ods package(Accounts) publish archive
properties(archive_name="Accounts.zip"
archive_path="/SAS/BIU/INPUT");
ods package(Accounts)
close;
But in mail only the second sheets appears, is there any solution of exporting two sheets in excel.
In this dbms=excel and excelcs are not working.
Any help would be greatly appreciated
Get rid of 'replace' ?
I don't believe DBMS=XLSX supported multisheet excel workbooks until the latter versions. You need to include your SAS version, not EG.
As @Rezza pointed out, try other engine. DBMS=excel DBMS=xls
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.