BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ROHINISDAS
Obsidian | Level 7

Please help me in importing excel file using infile statement. How can i import gold.xls platinum.xls and titanium.xls separately. 

 

 

 


excel.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Hi . Why are you trying to read an Excel file via a data step?

The Data step is good for importing txt and csv files, not excel.

 

I would use proc import.

 

 

View solution in original post

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

Hi . Why are you trying to read an Excel file via a data step?

The Data step is good for importing txt and csv files, not excel.

 

I would use proc import.

 

 

ROHINISDAS
Obsidian | Level 7
i tried doing through proc import and it was successful. Now i want to try the same through infile statement.
Kurt_Bremser
Super User

You CANNOT import an Excel file through the infile method. This method is for reading text files, which Excel files are not.

If you want to read data from Excel in a data step with infile, you need to export your Excel spreadsheet to a text-based file format like csv.

ROHINISDAS
Obsidian | Level 7
thank you providing new information.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 4 replies
  • 20618 views
  • 1 like
  • 3 in conversation