09-28-2014 11:13 AM
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
09-28-2014 02:51 PM
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.
09-28-2014 06:13 PM
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.