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
SAS Super FREQ

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.

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1038 views
  • 0 likes
  • 5 in conversation