BookmarkSubscribeRSS Feed
drvasu
Calcite | Level 5

Hi, 

 

Can you please help me to extract the data in this .SAS file into Excel? 

 

5 REPLIES 5
SASJedi
Ammonite | Level 13

This file is a SAS program, not a SAS data set. It contains only SAS code (text). Can you provide details about what you intend to accomplish?

Check out my Jedi SAS Tricks for SAS Users
drvasu
Calcite | Level 5

I would like to get the details of the codes 

PaigeMiller
Diamond | Level 26

@drvasu wrote:

I would like to get the details of the codes 


Ask specific questions about the code. Explain (as @SASJedi said) what it means to extract this into Excel.

--
Paige Miller
Tom
Super User Tom
Super User

If you want to read a text file, like the one you posted, use a DATA step.

data code ;
  infile 'clean data.sas' truncover ;
  row+1;
  input code $char200.;
run;

If you want to write data into Excel you can use PROC EXPORT, or the XLSX libname engine or the ODS EXCEL engine.