BookmarkSubscribeRSS Feed
spg
Obsidian | Level 7 spg
Obsidian | Level 7
Can frequency tables (displayed in the output window) be saved as excel files? I can't export these tables, and I can't copy-paste them on to an excel file as the format gets all garbled.

Suggestions will be appreciated.
6 REPLIES 6
deleted_user
Not applicable
I'm interesting if there is a better way to do this, I create the results in HTLM (under tools, options, preferences) and then copy and paste into excel
Tim_SAS
Barite | Level 11
You can use ODS to save procedure output in Excel format. Here's some documentation: http://support.sas.com/rnd/base/ods/excel/index.html.
spg
Obsidian | Level 7 spg
Obsidian | Level 7
Thanks! i have been reading the documentation, but have not been able to successfully export the tables.

i use the html procedure as well, but it garbles the format.
Tim_SAS
Barite | Level 11
If you describe the problem you're encountering and post some code to demonstrate the problem, somebody on this forum may be able to offer a suggestion.
stateworker
Fluorite | Level 6
A couple of things you might consider are outputting to a data set and then you can export that data set to Excel. What you would do is this:

proc freq data=lib.test ;
table var1 / out=list.test1;
run;

Your new data set would have three variables: var1, count, and percent. This is fine for a single variable frequency. If you do a by- frequency, then you'd get a more complex data set.

One thing that I've had good luck with in copy/pasting single frequency tables from the output window is using the Excel feature of Data / Text-to-Columns. It takes a little playing around with to get it to break just right, but it's pretty forgiving.

Good luck.
spg
Obsidian | Level 7 spg
Obsidian | Level 7
Thanks stateworker. Your tip was very useful!
I have used the Text to Columns feature before....but I was having trouble doing the same for the frequency tables.

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 25166 views
  • 3 likes
  • 4 in conversation