Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I would like delete all sheets in an excel file or delete the entire file from the pc like self destroyer after a period of time. Is there any possibility to do so?

Replies are listed 'Best First'.
Re^3: Delete a sheet from Excel
by Corion (Patriarch) on May 24, 2009 at 17:59 UTC

    Yes:

    perl -le "sleep $period_of_time; unlink $excel_file";
      could you plz explain more since Am a new fish in this field, and it will be great if provide some instructions on where to place the code. thank you for your replay

        To see what my code does, you should learn Perl. The relevant documentation is in perlrun, sleep and unlink.

        But you need to realize that your task is foolish and easily circumvented, because there is no way to make an Excel file self-destruct that the user couldn't easily prevent, for example by making a copy of the file before opening it.