DATA Step, Macro, Functions and more

How to Export sas7bdat file into excel

Reply
New Contributor
Posts: 2

How to Export sas7bdat file into excel

Hi All !,

 

i have alkoot_gross.sas7bdat file have 300MB . i need to export it into excel file. please give your suggestions.

Super User
Super User
Posts: 9,407

Re: How to Export sas7bdat file into excel

I would suggest reading the extensive documentation and help videos.

http://support.sas.com/documentation/94/

http://video.sas.com/

 

There are numerous methods, depending on what software you have installed (i.e. what SAS you have, where it is installed etc.) and what output type you want, xlsx, xls, csv etc.  

New Contributor
Posts: 2

Re: How to Export sas7bdat file into excel

actually i've installed sas university edition in my system ( it have .ova file) . i didn't used sas before. that's why asking detailed suggestions from you guys.

Super User
Posts: 9,886

Re: How to Export sas7bdat file into excel

The SAS UE website has a host of tutorial videos, at least one covers Export to Excel.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Super User
Posts: 7,932

Re: How to Export sas7bdat file into excel

I would suggest using the XLSX libname engine. It is simple and will help you begin to learn SAS syntax.

First make a libref that points to the  directory that holds your SAS dataset. Then make a second libref that points to the file you want to create. 

libname in '/folders/myfolders/';
libname out xlsx '/folders/myfolders/alkoot_gross.xlsx' ;

Then you can use a data step 

data out.alkoot_gross;
  set in.alkoot_gross;
run;

or proc copy

proc copy inlib=in outlib=out;
  select alkoot_gross ;
run;
Super User
Posts: 9,886

Re: How to Export sas7bdat file into excel

If your dataset still fits into the limits of Excel spreadsheets (number of rows, number of columns), you just need to do a google search on the theme. There's already gazillions of posts here about export to Excel.

If not, forget it.

 

Personally I consider it brain-rotten stupid to put that much data into such an unreliable plaything as Excel. Especially when you have SAS at hand anyway. It's like trying to move five tons of boulders on a skateboard.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 23,262

Re: How to Export sas7bdat file into excel


@SaraVana wrote:

Hi All !,

 

i have alkoot_gross.sas7bdat file have 300MB . i need to export it into excel file. please give your suggestions.


The links included have detailed tutorials that illustrate how to export data. But if you really can't figure it out, you can right click the data set in the library, and select Export. It'll pop up a GUI interface that you can use to export the data. 

 

SAS Studio also has the built in tasks that will allow you to do it via a GUI or you can look at the snippets as well, for the skeleton code. 

The Tasks are on the left hand pane, under Data I believe.

Ask a Question
Discussion stats
  • 6 replies
  • 121 views
  • 0 likes
  • 5 in conversation