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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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