I am using a libname statement to access the different sheets in an .xls workbook. For example,:
libname xls "C:\MyDoc.xls";
However, I noticed that sometimes a sheet with a long sheet name does not appear in my library. Is there a workaround for this apparent character limit?
Thanks. Can you illustrate how to do that? Alternatively, is there a way to count the number of sheets in an Excel workbook without extracting the name, even if the sheet name is longer than 32 characters?
I was confronted with that issue once with an older xls file and ended up (reluctantly) editing the file to shorten the sheet name.
There is no workaround in the current SAS version for displaying sheet/table names longer than 32 characters in SAS library lists. The same problem occurs with accessing databases such as Oracle, SQL Server etc.
The only way to read these is using SQL PASSTHRU where you can specify a sheet name longer than 32 characters.
This is an often-requested enhancement to SAS so I'm hopeful it will happen in a future release.
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!