In going from SAS (Proc Tabulate) to Excel (via ODS), whenever there is a ".0" (from tabulate) it is lost in Excel.
Example: "2.0" from tabulate is shown as "2.0" in the excel table, but is actually shown as "2" in the formula bar and in subsequent formula bar output. Anything other than ".0" is OK. Thought I had a workaround for this. Thanks so much.
ods excel file='......xlsx';
OPTIONS orientation=landscape nodate;
proc tabulate data=s31cm.cm_coded_post_s format=10. S=[foreground=black just=c] out=post_table;
class level4 medpnt arm; keylabel N=' ';
table level4=''*(medpnt='') all='Overall',
arm=''*(n='' colpctn=''*f=8.1 )
(n='' colpctn=''*f=8.1 )/misstext='0';
where level4 in ('OTHER ANTIHISTAMINES FOR SYSTEMIC USE, R06AX' 'PROTON PUMP INHIBITORS, A02BC');
run;
ods excel close;
Since "2" and "2.0" calculate exactly the same I would not worry about differences in the "formula" bar of Excel. It does the same thing when you manually enter data.
this is for a table to present....here's 2 columns in Excel, counts and percentages (1 decimal place).....there needs to be a ".0" added for the 2 and 100 percentage values
Arm 1: 2RHZE/4RH | |
0 | 0 |
2 | 3.9 |
5 | 9.8 |
1 | 2 |
14 | 27.5 |
7 | 13.7 |
15 | 29.4 |
6 | 11.8 |
1 | 2 |
51 | 100 |
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!
Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.