DATA Step, Macro, Functions and more

The deleted table will automatically be recovery by "$" table

Reply
Regular Contributor
Posts: 205

The deleted table will automatically be recovery by "$" table

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!

Trusted Advisor
Posts: 1,378

Re: The deleted table will automatically be recovery by "$" table

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.

Super User
Posts: 17,829

Re: The deleted table will automatically be recovery by "$" table

Is myData a sheet or named range?

Regular Contributor
Posts: 205

Re: The deleted table will automatically be recovery by "$" table

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
Super User
Super User
Posts: 6,500

Re: The deleted table will automatically be recovery by "$" table

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?

Regular Contributor
Posts: 205

Re: The deleted table will automatically be recovery by "$" table

[ Edited ]

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.

Ask a Question
Discussion stats
  • 5 replies
  • 160 views
  • 0 likes
  • 4 in conversation