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"

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1173 views
  • 0 likes
  • 3 in conversation