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.
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
Thanks Art. I want to do it using the excel libname engine as I am updating an existing named range in excel.
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
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.
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.