BookmarkSubscribeRSS Feed
3 REPLIES 3
Reeza
Super User
Assign a libname to the Excel workbook and use PROC CONTENTS.

*This code will create a libname reference to an Excel file and list all Sheets in the results window;
libname sample xlsx 'C:\Temp\Sample_v2.xlsx'; *your statement will depend on your OS/Excel version;

proc contents data=sample._all_;
run;

*copy all worksheets to work library;
proc copy in=sample out=work;
run;
inavjots
Fluorite | Level 6
libname sample xlsx '/folders/myfolders/EPG194/data/storm.xlsx';
proc contents data=sample._all_;
run;
proc copy in=sample out=work;
run;


It keeps loading. Is there something wrong?
Reeza
Super User
What do you mean it keeps loading?
Which step is it having issues with? Run each section (libname, proc contents, proc copy) separately and see exactly which one is problematic.

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
  • 3 replies
  • 1587 views
  • 2 likes
  • 2 in conversation