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.

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
  • 956 views
  • 2 likes
  • 2 in conversation