BookmarkSubscribeRSS Feed
rpellicaan
Fluorite | Level 6

Hi,

 

We are migrating from SAS 9.4 M1 on windows to SAS 9.4M6 on AIX. We are running into an issues with excel files. On windows, we were using the EXCEL library engine. There we could delete a sheet within an excel file with PROC DATASETS delete:

 

LIBNAME MYEXCEL EXCEL &FILEPATH;

PROC DATASETS LIB=MYEXCEL NOLIST;
delete 'Blad2$'n;
run;

LIBNAME MYEXCEL CLEAR;

 

On AIX the EXCEL engine is not available. We tried switching to the XSLX engine, but then we get the error: 

ERROR: MYEXCEL.BLAD2.DATA cannot be deleted because files cannot be deleted from the MYEXCEL library

 

How can we delete a sheet within an excel-file with SAS on AIX?

 

AIX code:

 

LIBNAME MYEXCEL xlsx &FILEPATH;

PROC DATASETS LIB=MYEXCEL ;
delete 'BLAD2'n;
run;

LIBNAME MYEXCEL CLEAR;

 

Thank you,

Rob

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16

I am not sure if we delete a sheet, we can empty the contents of the sheet.

 

 

Thanks,
Jag
dcmacedo
Obsidian | Level 7

You have limited support using the xlsx engine. Some features are not available on this engine. "Comparing SAS LIBNAME Engines for PC Files Data".
One option is to keep Excel files on a Windows machine with the "SAS PC File Server".
"SAS PC Files Server"
"SAS 9.4 PC Files Server: Installation and Configuration Guide"

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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