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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.