Hi.
My titles wont show in the output. whats wrong here?
ods excel file="F:\Brugere\MMEA\Ventetider2.xlsx" options(sheet_name="Hovedcentre");
proc odstext;
p "Samfundspor: Overblik over ventetider. Åbne testtilbud, % ledige tider" / style=[color=STEEL font_weight=bold];
p "Blå = >10% ledige tider, Rød = <10% ledige tider. Bemærk at hvis felterne er tomme, er der ikke booket nogle tider på den pågældende dato";
p "Tallene hentes direkte fra prøvebestillingssystemet uden stikprøvekontrol, og der kan derfor forekomme fejl unøjeagtigheder";
p "Ventetiderne er opgjort for COVID-19 podninger til voksne. Podninger af børn og antistof indgår ikke."
p "Kun opgjort for Testcenter Danmark (Samfundssporet)"
p "For nære kontakter indgår kun testcentre som er åbent hver dag. Kilde: SSI og Synlab";
run;
options mprint;
proc format;
/*value pctf .='N/A' ventetid percentn10. low-<0.1= 0.1-high=ventetid format=percentn10.*/;
value colorf .=white low-<0.1=Firebrick 0.1-high=lightblue;
run;
%macro many_col;
proc sql noprint;
select count(distinct dato) into :ncols from pdf1;
quit;
%put &=ncols;
proc report data=pdf1 style(header) = {background = lightgray color = black};
columns region teststed metode dato,ventetid;
define Region/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_weight=bold font_face=calibri};
define teststed/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_face=calibri};
define metode/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_face=calibri};
define dato/across order=internal format= ddmmyyd10. style(header) = {background = lightgray color = black font_weight=bold font_face=calibri};
define ventetid/sum format=percentn10./*format=pctf5. */'';
compute ventetid;
%do i=1 %to &ncols;
call define("_c%eval(&i+3)_",'style','style={background=colorf. color=black font_face=calibri font_weight=bold}');
%end;
endcompute;
run;
%mend;
%many_col
ods excel close;
ps. is it possible to delete old questions in this community?
You have no TITLE statement so not sure why you'd expect to see a title.
What part of your code are you expecting to function as the title?
You can delete questions but if there have been responses or it's been a while not sure you still have that option.
@mmea wrote:
Hi.
My titles wont show in the output. whats wrong here?
ods excel file="F:\Brugere\MMEA\Ventetider2.xlsx" options(sheet_name="Hovedcentre"); proc odstext; p "Samfundspor: Overblik over ventetider. Åbne testtilbud, % ledige tider" / style=[color=STEEL font_weight=bold]; p "Blå = >10% ledige tider, Rød = <10% ledige tider. Bemærk at hvis felterne er tomme, er der ikke booket nogle tider på den pågældende dato"; p "Tallene hentes direkte fra prøvebestillingssystemet uden stikprøvekontrol, og der kan derfor forekomme fejl unøjeagtigheder"; p "Ventetiderne er opgjort for COVID-19 podninger til voksne. Podninger af børn og antistof indgår ikke." p "Kun opgjort for Testcenter Danmark (Samfundssporet)" p "For nære kontakter indgår kun testcentre som er åbent hver dag. Kilde: SSI og Synlab"; run; options mprint; proc format; /*value pctf .='N/A' ventetid percentn10. low-<0.1= 0.1-high=ventetid format=percentn10.*/; value colorf .=white low-<0.1=Firebrick 0.1-high=lightblue; run; %macro many_col; proc sql noprint; select count(distinct dato) into :ncols from pdf1; quit; %put &=ncols; proc report data=pdf1 style(header) = {background = lightgray color = black}; columns region teststed metode dato,ventetid; define Region/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_weight=bold font_face=calibri}; define teststed/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_face=calibri}; define metode/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_face=calibri}; define dato/across order=internal format= ddmmyyd10. style(header) = {background = lightgray color = black font_weight=bold font_face=calibri}; define ventetid/sum format=percentn10./*format=pctf5. */''; compute ventetid; %do i=1 %to &ncols; call define("_c%eval(&i+3)_",'style','style={background=colorf. color=black font_face=calibri font_weight=bold}'); %end; endcompute; run; %mend; %many_col ods excel close;ps. is it possible to delete old questions in this community?
I have put the title statments here now
still doesnt work
ods excel options(sheet_name="supplerende");
options mprint;
proc format;
/*value pctf .='N/A' ventetid percentn10. low-<0.1= 0.1-high=ventetid format=percentn10.*/;
value colorf .=white low-<0.1=Firebrick 0.1-high=lightblue;
run;
%macro many_col;
proc sql noprint;
select count(distinct dato) into :ncols from pdf2;
quit;
%put &=ncols;
TITLE1 'Samfundspor: Overblik over ventetider' ;
TITLE2 'Supplerende testtilbud, % ledige tider';
TITLE3 'Blå = >10% ledige tider, Rød = <10% ledige tider';
TITLE4 'Bemærk at hvis felterne er tomme, er der ikke booket nogle tider på den pågældende dato';
TITLE5 'Tallene hentes direkte fra prøvebestillingssystemet uden stikprøvekontrol, og der kan derfor forekomme fejl unøjeagtigheder';
TITLE6 'Ventetiderne er opgjort for COVID-19 podninger til voksne. Podninger af børn og antistof indgår ikke.';
TITLE7 'Kun opgjort for Testcenter Danmark (Samfundssporet)';
TITLE8 'For nære kontakter indgår kun testcentre som er åbent hver dag. Kilde: SSI og Synlab';
proc report data=pdf2 style(header) = {background = lightgray color = black};
columns region teststed metode dato,ventetid;
define Region/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_weight=bold font_face=calibri};
define teststed/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_face=calibri};
define metode/group style(header) = {background = lightgray color = black font_weight=bold font_face=calibri} style(column) = {background = lightgray color = black font_face=calibri};
define dato/across order=internal format= ddmmyyd10. style(header) = {background = lightgray color = black font_weight=bold font_face=calibri};
define ventetid/sum format=percentn10./*format=pctf5. */'';
compute ventetid;
%do i=1 %to &ncols;
call define("_c%eval(&i+3)_",'style','style={background=colorf. color=black font_face=calibri font_weight=bold}');
%end;
endcompute;
run;
%mend;
%many_col
ods excel close;
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.