BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello All,

 

When I trying to update .xlsx file woth libname excel engine,

 

 

libname mylib Excel 'C:\temp\aaaaaa.xlsx';

 

I am trying to Delete the table :
   proc sql
       drop table mylib.'myData$'n;
  quit;

 

But It will automaticaly recovery the deleted tables by the table end with a "$", also I can't delete the talbes with "$"

what to do??

 

 

Thanks!

5 REPLIES 5
Shmuel
Garnet | Level 18

Define FILENAME refering the excel file that need to be deleted, then

use FDELETE function to delete the file.

 

filename todel 'C:\temp\aaaaaa.xlsx';

data _null_;

     rc = fdelete(todel);

run;

 

Old $ files, try to delete by OS command.

Reeza
Super User

Is myData a sheet or named range?

GeorgeSAS
Lapis Lazuli | Level 10
a sheet name.
after deleted and create new one. the old one still there but the new one will change name followed by an extra '1'

That is: if I delete sheet1 and create new sheet1, the old sheet1 will be still there, but my new sheet1 will become sheet11
Tom
Super User Tom
Super User

Why do you have three different threads for the same topic?

If you cannot update your version of SAS to something more modern then perhaps you can instead ask Excel to remove the sheet for you.

You should also check your settings in Excel. Perhaps there is some setting in Excel that is causing the sheets to not be permanently deleted?

Did you try closing the workbook between when you delete the old sheet and when you try to add it back?

GeorgeSAS
Lapis Lazuli | Level 10

Thank you Tom.


I create new topic because I just find new problem need to be focused.excuse me for the confuse.

At same time I tried to modify Excel.I can't find the solution so far and I am still keeping on trying.

I tried close them before modify them for sure. in each times.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 5 replies
  • 976 views
  • 0 likes
  • 4 in conversation