SAS9.4 M3 I'm trying to use your logic. It was created in EG then generated a stored process. When I run the stored process, it opens on the screen but not in Excel. It should open in Excel with multiple worksheets as it does in EG. Did you drop the %global statements the original poster was using? I'm trying to figure out why your logic doesn't work for me. Result capabilities in Stored Process are set to Stream and Package. I'm needing to use on a portal page. Any help is appreciated. proc format;
value yaa .=' '
other=[comma10.];
run;
*ProcessBody;
data _null_;
rc = stpsrv_header('Content-type','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
rc = stpsrv_header('Content-disposition','attachment;filename=result.xlsx');
run;
ods excel file= _webout
options(sheet_interval='none'
sheet_name='M1 > M2'
embedded_titles='yes'
embedded_footnotes='yes'
tab_color='purple'
start_at='1,1'
frozen_headers='yes'
autofilter='1-5'
zoom="90");
title justify=left font="Arial" height=14pt color=black bold 'Shop Throughput Greater in Month 1 versus Month 2';
footnote justify=left font="Arial" height=12pt color=black 'Only displaying where throughput units were greater in month 1 versus month 2.';
proc report data=work.descriptions nowd headline headskip spacing=1
style(header) = {font_face="Arial" font_size=13pt bordercolor=black background=orange foreground=white}
style(column) = {background=white font_face="Arial" font_size=10pt};
columns(CC Noun Description Rec_Code Tracking_Flag
('_Month 1_' MONYY Qnew Sum_of_ORDR Sum_of_ORDR1)
('_Month 2_' MONYY1 Qnew1 Sum_of_ORDR2 Sum_of_ORDR11)
Difference CMTS_Planning);
define CC / order=data 'CPN' center style(column)=[cellwidth=85];
define NOUN / 'Noun' center style(column)=[cellwidth=125];
define Description / 'Description' center style(column)=[cellwidth=200];
define Rec_Code / 'Resource/Code' center style(column)=[cellwidth=125];
define Tracking_Flag / 'Tracking / Flag' center style(column)=[cellwidth=125];
define MONYY / 'Month 1' display center
style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=90] ;
define Qnew / 'TP' display center
style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=85];
define Sum_of_ORDR / 'Bypass/ AVSH' display center format=yaa.
style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=100];
define Sum_of_ORDR1 / ' Sent to/Vendor' display center format=yaa.
style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=100];
define MONYY1 / 'Month 2' display center
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=90];
define Qnew1 / 'TP' display center
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=85];
define Sum_of_ORDR2 / 'Bypass' display center format=yaa.
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=100];
define Sum_of_ORDR11 / 'Sent to/Vendor' display center format=yaa.
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=100];
define Difference / 'TP Quantity/ Month 1 > Month 2 Comparison' display center
style(column)=[cellwidth=160];
define CMTS_Planning / 'Planner /Comments' display left
style(column)=[cellwidth=500];
run;
ods excel options(sheet_interval='output');
ods exclude all;
data _null_;
declare odsout obj();
run;
ods select all;
ods excel options(sheet_interval='none' sheet_name='M2 > M1' tab_color='orange' );
title justify=left font="Arial" height=14pt color=black bold 'Shop Throughput Greater in Month 2 versus Month 1';
footnote justify=left font="Arial" height=12pt color=black 'Only displaying where throughput units were greater in Month 2 than Month 1 .';
proc report data=work.description2 nowd headline headskip spacing=1
style(header) = {font_face="Arial" font_size=13pt bordercolor=black background=orange foreground=white}
style(column) = {background=white font_face="Arial" font_size=10pt};
columns(CC Noun Description Rec_Code Tracking_Flag
('_Month 1_' MONYY Qnew Sum_of_ORDR Sum_of_ORDR1)
('_Month 2_' MONYY1 Qnew1 Sum_of_ORDR2 Sum_of_ORDR11)
Difference CMTS_Planning);
define CC / order=data 'CPN' center style(column)=[cellwidth=85];
define NOUN / 'Noun' center style(column)=[cellwidth=125];
define Description / 'Description' center style(column)=[cellwidth=200];
define Rec_Code / 'Resource/Code' center style(column)=[cellwidth=125];
define Tracking_Flag / 'Tracking / Flag' center style(column)=[cellwidth=125];
define MONYY / 'Month 1' display center style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=90] ;
define Qnew / 'TP' display center style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=85];
define Sum_of_ORDR / 'Bypass' display center format=yaa.
style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=100];
define Sum_of_ORDR1 / 'Sent to/Vendor' display center format=yaa.
style(header)=[foreground=white background=lightblue]
style(column)=[cellwidth=100];
define MONYY1 / 'Month 2' display center
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=90];
define Qnew1 / 'TP' display center
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=85];
define Sum_of_ORDR2 / 'Bypass' display center format=yaa.
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=100];
define Sum_of_ORDR11 / ' Sent to/Vendor' display center format=yaa.
style(header)=[foreground=white background=lightgreen]
style(column)=[cellwidth=100];
define Difference / 'TP Quantity/ Month 1 < Month 2 Comparison' display center
style(column)=[cellwidth=160];
define CMTS_Planning / 'Planner /Comments' display left
style(column)=[cellwidth=500];
run;
ods excel close;
... View more