Hi all,
I have used proc freq data step to count the number of clients and I have the output result.
I want to export the output result to excel. I have done normal export step to export the entire table but I don't know how to export the proc freq table to excel. Can you please assist if that can be done? When I try to export the proc freq data information, which table name should I consider? If I select the table name it will pull the table where the proc freq data is coming from. Please see an example of below code to understand.
Proc export data=Accs_To_Track
outfile='\\JP.local\shares\public\Trace\Accsintrace.xlsx'
dbms=xlsx
replace;
sheet="Accs_To_Track";
run;
This will pull the Accs_to_Track table instead of the proc freq data that I want.
Take a look at ODS:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p09n5pw9ol0897n1qe04zeur27rv.htm
ods excel file="something.xlsx";
proc freq data = ...
...
run;
ods excel close;
@Sandeep77 wrote:
ods excel file="something.xlsx";
proc freq data = ...
... (what does these three dot mean?)
run;
ods excel close;
These dots are a stand-in for the PROC FREQ code you already have (but did not post).
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.