Help using Base SAS procedures

SAS 9.3 Libname for Excel file missing one sheet

Reply
Occasional Contributor
Posts: 8

SAS 9.3 Libname for Excel file missing one sheet

Hi,

I am tryin to import an Excel file that has three sheets, but when I try to use a libname statement to access the sheet names, it only seems to pick up 2 sheets. Does anyone have experience with this and can tell me what the issue might be?

The code I'm using is:

libname xl "C:\....\Sample File.xls";

Thanks a lot

Super User
Posts: 10,476

Re: SAS 9.3 Libname for Excel file missing one sheet

Please show the names of the sheets in the Excel file.

Occasional Contributor
Posts: 8

Re: SAS 9.3 Libname for Excel file missing one sheet

For example, the sheet names are:

1) Cash and Liquidity Cushion Mgt

2) Cash Movement Summary

3) Fees & Misc.

I have a few hundred Excel files with varying numbers of sheets, but the first sheet ("Cash and Liquidity Cushion Mgt") is never identified. I tried renaming or re-ordering but to no avail.

Super User
Posts: 17,776

Re: SAS 9.3 Libname for Excel file missing one sheet

Then it's something in the sheet.

How does this one differ from the others?

Copy the workbook and delete sections of the sheet at time (binary search) until you narrow it down.

Respected Advisor
Posts: 4,641

Re: SAS 9.3 Libname for Excel file missing one sheet

The sheet name is too long. Try making them shorter.

PG

PG
Super User
Posts: 17,776

Re: SAS 9.3 Libname for Excel file missing one sheet

It's only 30 chars?

Super User
Posts: 10,476

Re: SAS 9.3 Libname for Excel file missing one sheet

Excel sheets can have blanks that aren't seen unless you highlight the name like preparing to rename. And even then depending on the font may not be noticeable. I was suspecting long names which is why I asked earlier.

Respected Advisor
Posts: 4,641

Re: SAS 9.3 Libname for Excel file missing one sheet

Actually you can still read table xl.'Cash and Liquidity Cushion Mgt$'n but you can't see it in SAS Explorer window.

PG

PG
Ask a Question
Discussion stats
  • 7 replies
  • 351 views
  • 0 likes
  • 4 in conversation