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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 921 views
  • 2 likes
  • 2 in conversation