After several updates (including SAS 9.2 to SAS 9.3), an ODS to EXCEL sequence that is one of my workhorses now works only partially. The only problem is a failure to add specified column labels.
The code is:
ods html path="c:\temp\" (url=none) file="&YEAR._H01.xls" style=minimal;
PROC PRINT NOOBS LABEL DATA=M6;
TITLE1 'TABLE H01';
TITLE2 'MARRIAGES BY COUNTY OF ISSUANCE OF LICENSE ';
TITLE3 'BY MONTH OF MARRIAGE';
TITLE4 "KANSAS, &YEAR";
FORMAT COUNTY COUNTY_B.;
LABEL COUNTY='COUNTY OF ISSUANCE' COL1='TOTAL' COL2='JAN' COL3='FEB'
COL4='MAR' COL5='APR' COL6='MAY' COL7='JUN'
COL8='JUL' COL9='AUG' COL10='SEP' COL11='OCT' COL12='NOV' COL13='DEC';
RUN;
ods html close;
The column labels that appear in the output are COUNTY, COL1, COL2, COL3, etc.
Does anyone have any idea what is going wrong?
Thanks,
David Oakley
TABLE H01 | |||||||||||||
MARRIAGES BY COUNTY OF ISSUANCE | |||||||||||||
BY MONTH OF MARRIAGE | |||||||||||||
KANSAS, 2012 | |||||||||||||
COUNTY | COL1 | COL2 | COL3 | COL4 | COL5 | COL6 | COL7 | COL8 | COL9 | COL10 | COL11 | COL12 | COL13 |
Allen | 71 | 3 | 4 | 6 | 5 | 5 | 12 | 10 | 4 | 6 | 9 | 5 | 2 |
Anderson | 47 | 0 | 2 | 1 | 7 | 7 | 7 | 5 | 3 | 4 | 5 | 3 | 3 |
Hi, there is an option that will "turn off" the use of LABELS until you turn it back on again.
14973 - Labels not displayed with NOLABEL system option set
You might try:
options label;
before your ods html step. Perhaps your administrator turned off the use of labels as a default, for some reason.
SAS(R) 9.3 System Options: Reference, Second Edition
cynthia
I am not really sure why your labels do not work. But a quick fix would be rename those variables in a data step and use your above code.
If you need to write your reports in spreadsheets frequently have a look at EXELXP tagset.
Hi, there is an option that will "turn off" the use of LABELS until you turn it back on again.
14973 - Labels not displayed with NOLABEL system option set
You might try:
options label;
before your ods html step. Perhaps your administrator turned off the use of labels as a default, for some reason.
SAS(R) 9.3 System Options: Reference, Second Edition
cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.