BookmarkSubscribeRSS Feed
jhollenbeck
Fluorite | Level 6

When using the excel libname engine to export data to excel it replaces # in the label name with a dot.   It there a way to keep the # in the label and or column name?  I am using SAS 9.4.

3 REPLIES 3
art297
Opal | Level 21

The following worked for me:

 

data test;
  set sashelp.class;
  label weight='# of pounds';
  label height='# of centemeters';
run;

ods excel file="'/folders/myfolders/#test.xlsx'";
proc print data=work.test label noobs;
run;
ods excel close;

Art, CEO, AnalystFinder.com

 

jhollenbeck
Fluorite | Level 6

Thanks Art.  I want to do it using the excel libname engine as I am updating an existing named range in excel.

art297
Opal | Level 21

If you're just replacing the values in that/those named range(s), then a third alternative would be the free macro you can download at: http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export

 

Art, CEO, AnalystFinder.com

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 3 replies
  • 603 views
  • 1 like
  • 2 in conversation