BookmarkSubscribeRSS Feed
NJGIRL
Obsidian | Level 7

Dear All,

 

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

 

Thank! Jill1

7 REPLIES 7
PaigeMiller
Diamond | Level 26
NJGIRL
Obsidian | Level 7
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
PaigeMiller
Diamond | Level 26

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

--
Paige Miller
Reeza
Super User

@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

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

 

 

Sven111
Pyrite | Level 9

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;

 

NJGIRL
Obsidian | Level 7

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 7 replies
  • 924 views
  • 2 likes
  • 4 in conversation