BookmarkSubscribeRSS Feed
mmea
Quartz | Level 8

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?

3 REPLIES 3
Reeza
Super User

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?


 

mmea
Quartz | Level 8

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;
Reeza
Super User
Did you check the header of the Excel file?
I believe they go to the header with the default options and you can change that behaviour with the embedded_titles/embed_titles_once options.

Does the log show any Errors, Warnings, or Notes beyond the standard record written?

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=odsug&docsetTarget=p09n5p...