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

Hello, had a question regarding the XLSX libname engine. I am running SAS EG version 9.04.01M5.

 

I can successfully assign the library.

 

I am trying to simply use proc contents on the assigned XLSX library, but the library doesn't show the sheet names and the engine doesn't operate like I would expect it to. Do I have too old a version to utilize the XLSX engine?

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Since the XLSX LIBNAME can also be used to create a new Excel file, a successful LIBNAME does not mean that the file actually exists in the context of the SAS session. Keep in mind that your SAS may run on a server which has no connection to your desktop's drives.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

Since the XLSX LIBNAME can also be used to create a new Excel file, a successful LIBNAME does not mean that the file actually exists in the context of the SAS session. Keep in mind that your SAS may run on a server which has no connection to your desktop's drives.

AhmedAl_Attar
Ammonite | Level 13

@Unagi 

Actually according to this Blog https://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/

The XLSX engine was added to SAS 9.4 M2

From the blog, to see the sheet names stored in a specified workbook, try this code

/* because Excel field names often have spaces */
options validvarname=any;
libname xl XLSX '/folders/myfolders/sas_tech_talks_15.xlsx';

/* discover member (DATA) names */ proc datasets lib=xl; quit;
libname xl CLEAR;

Hope this helps

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 942 views
  • 0 likes
  • 3 in conversation