BookmarkSubscribeRSS Feed
kruzewski
Calcite | Level 5

What are the pros and cons of each method? Which is better?

Historically I have tended to use a proc import statement to import data from a xlsx file, but lately I have noticed the process will hang. The only work around which appears to work is by creating a pcfile libname and accessing the data that way....which leads me to wonder what are the pros and cons of each method. Is the libname the 'better way?'xls

2 REPLIES 2
SASKiwi
PROC Star

I've never struck the problems you are having with PROC IMPORT hence the choice of using IMPORT versus LIBNAME comes down to what it is to be used for.

PROC IMPORT is ideal for importing a single worksheet where you wish to explicitly name the output SAS dataset. The LIBNAME approach I find is better if you are importing several sheets from a workbook and want SAS to take care of the output dataset names. I find using PROC DATASETS with the LIBNAME is great for this.

We don't use the PC File Server as we use the 64-bit MS Office components with 64-bit SAS to avoid "bitness" issues that the PC File Server addresses, and it works very reliably.

Reeza
Super User

The only time I've run into issues is when you're dealing with SAS 64bit and Office 32 bit.

I prefer the libname method in general myself because you can see the file before 'importing', but that has nothing to do with functionality.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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