BookmarkSubscribeRSS Feed
Yul
Obsidian | Level 7 Yul
Obsidian | Level 7

היי,

אני רוצה לייצר מסמך אקסל אחד checks שיש בו גיליונות מתוכניות שונות. האם זה אפשרי?

ניסיתי לעשות באמצעות:


ods excel options (sheet_interval="none" sheet_name='xxx' embedded_titles="on")
file="Z:\Data\OUTPUTS\Checks.xlsx" ;
proc print noobs label data=OUTPUTS.xxx;
var _all_;
run;

ods excel close;

אבל כאשר אני מריצה את אותה פקודה עם שם גיליון אחר בתוכנית אחרת זה דורס את כל הקובץ. האם יש אופציה שהקובץ לא יידרס וייצר רק גיליון נוסף באותו המסמך checks?

2 REPLIES 2
Hagay
SAS Employee

שלום @Yul 

 

זה עובד על המחשב שלי עם SAS 9.4M6 על Windows:

ods excel file="C:\Users\User\Desktop\Temp\Checks.xlsx" options(sheet_name="sheet1");
proc print data=sashelp.class;
run;
ods excel options(sheet_name="sheet2");
proc print data=sashelp.cars;
run;
ods excel options(sheet_name="sheet3");
proc print data=sashelp.class;
run;
ods excel close;

גם זה עובד:

proc export data=sashelp.class outfile="C:\Users\User\Desktop\Temp\Example.xlsx" dbms=xlsx replace;
sheet="CLASS1";
run;

proc export data=sashelp.class outfile="C:\Users\User\Desktop\Temp\Example.xlsx"  dbms=xlsx replace;
sheet="CLASS2";
run;

חגי

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

Discussion stats
  • 2 replies
  • 1063 views
  • 1 like
  • 3 in conversation