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"

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 790 views
  • 0 likes
  • 3 in conversation