SAS Programming

DATA Step, Macro, Functions and more
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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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