Hello,
I'm trying to run a dynamic macro that appends all worksheets for each Excel workbook in a specified folder path.
I'm accomplishing this using a similar method to the one detailed here. I am using pcfiles engine for the libname as there is a mixture of .xlsx and .xls, and I'm running 64 bit SAS 9.4, so EXCEL libname engine doesn't work.
The problem I'm encountering is that some workbooks have sheet names of max length, which SAS does not find with a pcfiles libname statement. Is there a way to get a SAS libname statement to recognize max length sheet names so that I can utilize library memnames to dynamically append all sheets?
The attached Excel file has two sheets, one with a name too long to be caught by the below listed libname statement.
%let yourpath = c:\;
libname nametest pcfiles path = "&yourpath.example.xls";
Is there a way to get a pcfiles libname statement to recognize these longer names?
or
Is there an alternate method to accomplishing the same goal of dynamically appending all worksheets for all workbooks in a specified path? I'd prefer not to resort to VBA to alter the source files if at all possible.
Thanks,