BookmarkSubscribeRSS Feed
Hemanth003
Calcite | Level 5

1) is it possible to read a SAS file which is embedded in excel file ?if at all yes!! how? pls find the attachment.

2) is it possible to read a .b1 extension file in SAS? for example test.b1 

 

3 REPLIES 3
SASKiwi
PROC Star

1) I can't think of any easy way programmatically. A simple File Save As in Excel or manual copy and paste will work. Personally I think it is bad practice to hide away SAS files inside another vendor's files. Why not store them as designed as simple text files?

2) Does the .b1 extension have any significance or is it simply just a text file containing data? If it is just a text file then no problem.  

Kurt_Bremser
Super User

That somehow reminds me of the person that sent me a SAS log by embedding a screenshot in jpg format in an Excel file. Instead of just copy/pasting the text into the email.

 

Bottom line: don't even think about it. SAS files are SAS files and should always be stored as such.

If someone sent you that abomination, request to have data sent the right way.

Kurt_Bremser
Super User

Question 2: The extension is just part of the name, it does not tell you anything about the file's contents in a guaranteed way. If you rename garbage.xlsx to garbage.txt, it's still an Excel file, and you can't read it as text.

SAS will read any text file in a data step, even if it's named myfile.somestupidextensionimadeup

Look at the file documentation to decide how to import the contents into SAS.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 872 views
  • 0 likes
  • 3 in conversation