I recently ran into this problem attempting to use the ODS TAGSETS.EXCELXP in a PROC REPORT, the resulting output in .xml would open fine in Excel however the date fields would come through as TEXT even after applying the {TAGATTR='format:m/d/yyyy'} as a STYLE. My solution was two part; first create a new variable adding 21916 days to the original varialbe and secondly not applying a SAS format to the new variable. Now the PROC REPORT using ODS TAGSETS.EXCELXP results in an XML file that opens in Excel and the date fields are recognized by Excel as date and not as text.
Reference for the 21916 days came from this SUGI paper: http://www2.sas.com/proceedings/sugi29/068-29.pdf
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.