BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Li1
Calcite | Level 5 Li1
Calcite | Level 5

Hello,

Has anyone met with this problem?  Libref xxx was successfully assigned with Engine XLSX. From the  explore window I could see the library xxx and the sheet, but got an error message "ERROR: Couldn't find range or sheet in spreadsheet" when referring to the sheet with xxx.sheet. 

 

Thanks,

Scarlett

1 ACCEPTED SOLUTION

Accepted Solutions
Li1
Calcite | Level 5 Li1
Calcite | Level 5

Thank you guys! I have solved the problem. The sheet name in the XLSX file had a trailing blank. When the blank is removed, xxx.sheet works. 

View solution in original post

3 REPLIES 3
tarheel13
Rhodochrosite | Level 12

we would need more information to be able to help you. show the full log or the code you're using. 

Tom
Super User Tom
Super User

Be careful that you have actually pointed to an existing XLSX file and are not making a new file.

The LIBNAME statement has no way of knowing which you intended to do.  So if the filename you provided does not exist it makes a new, empty, file.

Li1
Calcite | Level 5 Li1
Calcite | Level 5

Thank you guys! I have solved the problem. The sheet name in the XLSX file had a trailing blank. When the blank is removed, xxx.sheet works. 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4614 views
  • 0 likes
  • 3 in conversation