DATA Step, Macro, Functions and more

Proc export to Excel

Reply
Contributor
Posts: 24

Proc export to Excel

Dear All,

 

Can anyone provide basic code to transfer a SAS dataset in to an Excel spreadsheet?

 

Thank! Jill1

Trusted Advisor
Posts: 1,620

Re: Proc export to Excel

Contributor
Posts: 24

Re: Proc export to Excel

I guess I sorta say 'thanks for your help' . I guess I was more looking for the actual code, not a path leading to sas documentation. not ungrateful, just for sake of time.. I only had 1/2 hour to do this for very demanding boss and was looking for quick help.
but thanks anyway. Jill 1
Trusted Advisor
Posts: 1,620

Re: Proc export to Excel

[ Edited ]

jill1 wrote:
I guess I sorta say 'thanks for your help' . I guess I was more looking for the actual code, not a path leading to sas documentation. not ungrateful, just for sake of time.. I only had 1/2 hour to do this for very demanding boss and was looking for quick help.
but thanks anyway. Jill 1

And if you had clicked on the link and scroll up or down (not an unreasonable expectation), you'd see example code right there on your screen.

Super User
Posts: 17,861

Re: Proc export to Excel


jill1 wrote:
I guess I sorta say 'thanks for your help' . I guess I was more looking for the actual code, not a path leading to sas documentation. not ungrateful, just for sake of time.. I only had 1/2 hour to do this for very demanding boss and was looking for quick help.
but thanks anyway. Jill 1

@jill1 I guess sorta your welcome. Those aren't documentation they're blog posts designed to exactly answer your question. Should we type out the exact same thing every time someone asks a basic question that google can answer? Directing you to high quality answers also takes time - in fact more than it would have taken to type out the answer. You'll note there's not one way - and given what you'd stated we don't know anything about your set up and which may have been the best solution. 

 

 

Super User
Posts: 17,861

Re: Proc export to Excel

Frequent Contributor
Posts: 82

Re: Proc export to Excel

[ Edited ]

I usually use this, although there are lots of ways to do this, each with its own pros and cons, some of the links provided by @Reeza and @PaigeMiller should help with understanding them.

 

PROC EXPORT DATA=lib_Out.DataPull
        outfile = "/home/username/output_file.xlsx"
        dbms    = xlsx;
        sheet   = "DataPull";
 RUN;

 

Contributor
Posts: 24

Re: Proc export to Excel

Thank you. I appreciate you sending the actual code my way! makes it alot easier/quicker than following the links people send. plus, I had 15 minutes to do it so this was VERY HELPFUL.

thanks! Jill1

Ask a Question
Discussion stats
  • 7 replies
  • 140 views
  • 2 likes
  • 4 in conversation