BookmarkSubscribeRSS Feed
bsam17
Calcite | Level 5

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

7 REPLIES 7
ballardw
Super User

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

bsam17
Calcite | Level 5

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.

Reeza
Super User

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.

PGStats
Opal | Level 21

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

PG

PG
Reeza
Super User

It's only 30 chars?

ballardw
Super User

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.

PGStats
Opal | Level 21

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

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 7 replies
  • 1007 views
  • 0 likes
  • 4 in conversation