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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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