Good Morning,
I am outputting a dataset into excel using tagsets.excelxp.
There is a date column that is formatted as date9. in SAS.
I am using a proc report within the ods code to output the data.
In the excel output, the date is formatted as text.
Is there a way I can show this as date format in excel?
/**********************************************************************/
ods tagsets.ExcelXP file="c:\test.xls"
style=egdefault
options(sheet_interval='none' sheet_name='referrals');
proc report data=referrals_freq;
run;
ods tagsets.ExcelXP close;
/**********************************************************************/
Hi, here are some examples. You might want to work with Tech Support, too. When I use SAS 9.4 and TAGSETS.EXCELXP, the date variable is numeric in Excel and respects the SAS format. Please refer to the code and output shown in the attached screen shots. If your version of SAS is 9.3 or 9.4 and you are not seeing the date format, then that is something that should be checked out.
cynthia
Check tagattr={} style . or change that date column into Character date by date9. format.
Hi, here are some examples. You might want to work with Tech Support, too. When I use SAS 9.4 and TAGSETS.EXCELXP, the date variable is numeric in Excel and respects the SAS format. Please refer to the code and output shown in the attached screen shots. If your version of SAS is 9.3 or 9.4 and you are not seeing the date format, then that is something that should be checked out.
cynthia
Thank you both for your help.
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.