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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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