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
Rhodochrosite | Level 12

@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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 198 views
  • 0 likes
  • 3 in conversation