The quickest way to delete a file in Excel

To delete a file in Excel, close the file first, then use your operating system's file manager — not Excel itself. On Windows, open File Explorer, find the file, right-click it, and select Delete. On Mac, open Finder, locate the file, and press Command+Delete. The file moves to your Recycle Bin (Windows) or Trash (Mac), where you can recover it if you change your mind.

If the file is currently open in Excel, save any changes you want to keep, then close it before deleting. Excel does not have a built-in delete function because the program manages spreadsheets, not files on your computer — your operating system handles file deletion.

Key Takeaways

  • Close the Excel file before deleting it; you cannot delete a file that is currently open in the program.
  • Use File Explorer (Windows) or Finder (Mac) to delete files, not Excel itself.
  • Right-click the file and select Delete to move it to your Recycle Bin or Trash, where you can restore it later if needed.
  • Permanently delete a file by emptying your Recycle Bin or Trash; files in these folders still take up storage space.
  • If you only want to clear the contents of a spreadsheet without deleting the file, select all cells and press Delete instead.

Deleting a file through File Explorer (Windows)

Open File Explorer and navigate to the folder where your Excel file is stored. Look for the file name — it will end in .xlsx, .xls, or .xlsm depending on the Excel version. Right-click the file name and select Delete from the menu that appears.

The file moves to your Recycle Bin. You can still recover it from there by opening the Recycle Bin, right-clicking the file, and selecting Restore. If you empty the Recycle Bin without restoring the file, deletion becomes permanent and recovery becomes much harder.

Deleting a file through Finder (Mac)

Open Finder and navigate to the folder containing your Excel file. Click the file once to select it, then press Command+Delete. The file moves to your Trash folder.

To recover the file later, open Trash, right-click the file, and select Put Back. If you empty the Trash, the file is permanently deleted. On Mac, you can also drag the file directly to the Trash icon in your dock if you prefer that method.

The difference between deleting contents and deleting the file

Deleting the file itself removes the entire spreadsheet from your computer. Deleting the contents clears the data inside the spreadsheet but leaves the file in place. Choose the right action based on what you actually need.

If you want to keep the file but remove the data, open it in Excel, press Ctrl+A (Windows) or Command+A (Mac) to select all cells, then press Delete. The spreadsheet remains on your computer but is now empty. This is useful when you want to reuse a file with the same formatting or structure but different data.

Recovering a deleted file from backup

If you empty your Recycle Bin or Trash before realizing you needed the file, recovery depends on whether you have a backup. Check whether your computer automatically backs up files through Windows Backup (Windows) or Time Machine (Mac). Both create copies of your files at regular intervals.

On Windows, right-click the folder where the file was stored, select Restore previous versions, and look for a version from before you deleted the file. On Mac, open Time Machine from System Preferences, navigate to the date when the file still existed, and restore it. If you do not use automatic backups, recovery becomes significantly harder and may require professional data recovery services.

Preventing accidental deletion

Before deleting any file, make sure it is not one you need. Check the file name and the folder location twice. If you are unsure whether you need the file, move it to a separate folder called "To Delete" and wait a week — if you do not miss it, then delete it permanently.

For files you use regularly, consider storing them in a cloud service like OneDrive, Google Drive, or Dropbox. These services keep copies of your files on their servers, so even if you delete the file from your computer, you can recover it from the cloud service's trash or version history for a limited time.

What happens when you delete a file permanently

When you empty your Recycle Bin or Trash, the file is marked as deleted on your hard drive, but the data itself is not immediately erased. The space it occupied becomes available for new files to overwrite. Until that happens, data recovery software can sometimes retrieve the file.

If you need to ensure a file cannot be recovered, use a secure deletion tool. On Windows, third-party programs like Eraser overwrite the file multiple times before removing it. On Mac, you can use the Secure Empty Trash feature in some older versions, though newer Macs do not offer this option. For most everyday use, standard deletion through the Recycle Bin or Trash is sufficient.

Frequently Asked Questions

Can I delete an Excel file while it is open?

No. Close the file in Excel first. If you try to delete a file that is currently open, your operating system will prevent the deletion because the program is still using it. Save your work, close Excel, then delete the file through File Explorer or Finder.

What if I accidentally deleted the wrong file?

Open your Recycle Bin (Windows) or Trash (Mac) immediately and look for the file. Right-click it and select Restore or Put Back to return it to its original location. If you have already emptied the Recycle Bin or Trash, check whether your computer has automatic backups through Windows Backup or Time Machine.

Does deleting a file from Excel delete it from my computer?

No. Excel does not have a delete function for files. You must use File Explorer (Windows) or Finder (Mac) to delete files from your computer. Excel only manages the data inside spreadsheets, not the files themselves.

Can I delete multiple Excel files at once?

Yes. In File Explorer or Finder, hold Ctrl (Windows) or Command (Mac) and click each file you want to delete. Once all files are selected, right-click and choose Delete. All selected files move to your Recycle Bin or Trash together.

How long do files stay in the Recycle Bin or Trash?

This varies by system. Windows typically keeps files in the Recycle Bin until it reaches a size limit (usually 10% of your hard drive), then automatically deletes the oldest files. Mac keeps files in Trash for 30 days before automatically removing them. You can also manually empty either one at any time.