BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
doakley
Calcite | Level 5

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
  OF LICENSE


 

 

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


 
1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ


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

View solution in original post

2 REPLIES 2
rnmishra
Calcite | Level 5

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.

Base SAS: Demo: ExcelXP Tagset and Microsoft Excel

Cynthia_sas
SAS Super FREQ


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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2020 views
  • 0 likes
  • 3 in conversation