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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.