You can delete the original file before doing the $sheetM->Save() (or even before starting to edit your new Excel-file). At least that is the workaround I use.
Unfortunately, if you cannot delete the original file (e.g because it is open ...), you will still have your problem. In that case, I would recommend to either turn the warning-dialog on again or to save the new file using another filename
HTH, RataIn reply to Re: Overwriting an excel file
by Ratazong
in thread Overwriting an excel file
by Rupa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |