09-17-2012 11:12 AM
How to get a comma separated value in an excel report generated from running a SAS code.
For Example : Values generated in Excel are being displayed as 1234, 10567, 3478.
I need these values to be generated as 1,234 - 10,567 and 3,478 separated as commas. I used comma7.0, comma8.0 and comma9.0 format but the result is not being changed.
09-17-2012 11:18 AM
How are you getting the values into Excel? The method is likely to effect how to set the display in Excel or if it is even possible.
09-17-2012 11:20 AM
Thanks for the quick response buddy..
I use ODStagsets.excelxp and refer it to using file = ".xls path"
09-17-2012 11:38 AM
The solution is going to be the TAGATTR style attribute. There is an example setting Excel display formats in the Tagset documentation. You can get that by running
ods tagsets.excelxp options(doc='Help');
09-17-2012 11:51 AM
OK. SO do you want me to try ODSTAGATTR..excelxp and refer it to the file=".xls path" to get the right format in getting the commas displayed?
09-17-2012 12:49 PM
No, you need to tell Excel the format you want the data to have and you do that using tagattr style attributes.
See this paper from Cynthia Zender as a reference on how to get what you want and an explanation of how/why it works.