BookmarkSubscribeRSS Feed
Sandeep77
Lapis Lazuli | Level 10

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.

 

4 REPLIES 4
PaigeMiller
Diamond | Level 26
ods excel file="something.xlsx";
proc freq data = ...
    ...
run;
ods excel close;
--
Paige Miller
Sandeep77
Lapis Lazuli | Level 10
ods excel file="something.xlsx";
proc freq data = ...
... (what does these three dot mean?)
run;
ods excel close;
Kurt_Bremser
Super User

@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).

sas-innovate-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

From SAS Users blog
Want more? Visit our blog for more articles like these.
5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 462 views
  • 1 like
  • 4 in conversation