Good day all,
i have the dataset of emp data.
its having different formats for salary variable. comma and percent format.
so i apply proc format for that.
PROC FORMAT;
VALUE FMT
LOW-0,1-HIGH=[COMMA32.]
OTHER=[PERCENT8.1]
;
RUN;
empno salary
aaa 1,52,133
bbb 2,50,111
aaa 25%
bbb 50%.
in proc report its showing as it is. but while exporting it into excel only percentages format is applying. the comma format is missing.
after export into excel the output like this.
empno salary
aaa 152133
bbb 250111
aaa 25%
bbb 50%
how to get the required output with applying comma and percentage format.
your valid comments are helps me a lot.
Thanks.
Try to write "2,50,111" into a cell in Excel and see if Excel accepts that as a number. My bet is, it won't (maybe depending on locale).
Instead of writing in excel while exporting only the format is there.
is it possible any sufficient method is there.
if there is two records then it is possible to manual entry. but when its contain thousands of records manual is not possible.
while exporting only the format is apply.
What I meant is that Excel does not regard 1,52,133 as a number, but as text. SAS therefore sends the pure value without formatting, so that the number stays a number.
BTW, if I use your format fmt. on the value 152133, it is rendered by SAS as 152,133, so I expect the locale value to play a big role in your problem.
Can any One know the answer for this please comment.
Thanks in Advance.
You need special style for excel .
Post it at ODS and Base Reporting Cynthia will give you answer.
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.