Monday, October 23, 2006

Exporting Multiple Data Sets to One Spreadsheet

It's easy to export several data sets to one Excel spreadsheet with each data set in a separate worksheet.This example exports three SAS data sets (work.region, work.county and work.district) to the same spreadsheet (results.xls).

Each data set will be in a separate worksheet:

proc export
data=work.region
outfile="c:\temp\results.xls"
dbms=Excel;
run;
proc export
data=work.county
outfile="c:\temp\results.xls"
dbms=Excel;
run;
proc export
data=work.district
outfile="c:\temp\results.xls"
dbms=Excel;
run;

Results.xls will have three worksheets, each one automatically labeled with the name of the data set it was created from.

19 Comments:

At 2:01 PM, Anonymous Anonymous said...

Linda look into using the Excel Libname Engine in SAS V9, the process becomes even easier and faster.

 
At 12:05 AM, Blogger Pavan Kumar Jupelli said...

1.like this, can i import multiple excel sheets from an excel file into multiple sas datasets?

2.multiple excel sheets from an excel file into a single sas dataset?

 
At 11:23 AM, Anonymous Anonymous said...

Linda,
I tried the tip, but still got only one sheet returned. Is this limited to version 6?
My code are:
PROC EXPORT DATA=work.CLMMATCH OUTFILE="C:\temp\CLAIMS-&MID1-&dt..xls" DBMS=EXCEL; RUN; PROC EXPORT DATA=work.clmnomat OUTFILE="C:\temp\CLAIMS-&MID1-&dt..xls" DBMS=EXCEL; RUN;
PROC EXPORT DATA=work.dianotin OUTFILE="C:\temp\CLAIMS-&MID1-&dt..xls" DBMS=EXCEL; RUN; anything went wrong here? Thanks!

 
At 5:19 AM, Blogger clinnovo said...

Nice Post Post ! SAS Training in Hyderabad is provided by clinnovo institute that is a pioneer in offering sas course. Data analysis can be done efficiently with the help of this course and clinnovo makes it easy to operate SAS while you are trying your hands on the same.

 
At 3:45 AM, Blogger Raju Kumar said...

This comment has been removed by the author.

 
At 10:23 AM, Blogger Raju Kumar said...


I am extremely impressed with your writing skills and also with the layout on your blog
sas online training

 
At 5:00 AM, Blogger Nainika Joseph said...

That is very interesting; you are a very skilled blogger. I have shared your website in my social networks! A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article.


SAP training in Chennai

 
At 6:16 AM, Blogger Nainika Joseph said...




Really very nice blog information for this one and more technical skills are improve,i like that kind of post.


SAP training in Chennai

 
At 3:34 AM, Blogger Nainika Joseph said...



This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.


SAP training in Chennai

 
At 12:37 AM, Blogger Camellia Canan said...



These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your articles really impressed for me,because of all information so nice.

SAP training in Chennai

 
At 3:37 AM, Blogger Nainika Joseph said...


Great Article I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because it becomes more and more interesting from the starting lines until the end. So Thank you for sharing a COOL Meaningful stuff with us Keep it up..!

SAP training in Chennai

 
At 4:47 AM, Blogger Nainika Joseph said...


Great Article I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because it becomes more and more interesting from the starting lines until the end. So Thank you for sharing a COOL Meaningful stuff with us Keep it up..!

SAP training in Chennai

 
At 5:11 AM, Anonymous Hussain said...

I keep on reading your blog post.. This was still amazing. Thanks a lot for sharing this unique informative post with us.. I really enjoyed by reading your blog post

Digital Marketing Company in Chennai

 
At 2:06 AM, Anonymous Aashi siva said...

This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.Your final conclusion was good. We are sowing seeds and need to be patiently wait till it blossoms.

Corporate Training in Chennai

 
At 12:41 AM, Blogger Aasha said...

Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care.As always, we appreciate you confidence and trust in us.

Email Marketing Chennai

 
At 12:40 AM, Anonymous hadoop online training said...


Hadoop online training in hyderabad.All the basic and get the full knowledge of hadoop.
hadoop online training in hyderbad

 
At 12:10 AM, Blogger Harish Raju said...

This blog is having a wonderful talk. The technology are discussed and provide a great knowledge toall. This helps to learn more details about technology. All this details are important for this technology. Thank you for this blog.
Digital Marketing Company in Chennai

 
At 3:54 AM, Blogger David Smith said...

I have read your blog its very attractive and impressive. I like it your blog.

Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

Java Online Training from India Java Online Training from India Java Online Training

 
At 3:38 AM, Blogger Pavel Co Ebele said...

I have read your blog its very attractive and impressive. I like it your blog.

ES6 Online Training JavaScript Training Courses JavaScript Training Courses | Angular 4 Online Training Angular 4 Online Training

 

Post a Comment

<< Home