How to Close a Workbook in Excel: All Methods Explained
In this article
To close a workbook in Microsoft Excel, you can click the 'X' in the top-right corner of the window, go to File > Close, or press Ctrl+W (Windows) or Cmd+W (Mac). Closing a workbook removes the specific file from your active view without necessarily shutting down the entire Excel application, allowing you to continue working on other open spreadsheets.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- An open Excel workbook that you wish to close.
- Administrative permissions to save changes to the file if it is stored on a protected network drive or shared folder.
Step-by-Step
Depending on your workflow, there are several ways to close a workbook. Note that menu labels may differ slightly depending on your version of Excel, your operating system, or your regional settings.
Method 1: Using the File Menu (The Standard Way)
- Click on the File tab located in the top-left corner of the Excel ribbon. This will take you to the Backstage view.
- Look at the left-hand sidebar menu. Scroll down or look for the Close option.
- Click Close.
- If you have made changes to the workbook since the last save, a dialog box will appear asking if you want to save your changes. Click Save to keep changes, Don't Save to discard them, or Cancel to return to the workbook.
Method 2: Using the Window Close Button (The Fast Way)
- Locate the X button in the extreme top-right corner of the Excel window (on macOS, this is the red circle in the top-left corner).
- Click the X button.
- If the workbook contains unsaved data, Excel will prompt you to save before the file closes. Choose your preferred option (Save or Don't Save).
- Note: If this is the only workbook open, clicking the 'X' will close both the workbook and the entire Excel application.
Method 3: Using Keyboard Shortcuts (The Power User Way)
- Ensure the workbook you want to close is the active window on your screen.
- On Windows: Press Ctrl + W. Alternatively, you can use Ctrl + F4.
- On macOS: Press Command + W.
- Respond to any save prompts that appear on the screen to finalize the closing process.
Method 4: Closing via the Quick Access Toolbar
- Look at the very top of the Excel window, above the ribbon, at the Quick Access Toolbar.
- If you have previously added the "Close" command to this toolbar, click the Close icon.
- If you do not see it, you can add it by clicking the small downward arrow on the right side of the Quick Access Toolbar and checking the box next to Close.
Common Mistakes
One of the most frequent errors users make is confusing "Closing a Workbook" with "Closing the Application." When you close a workbook via File > Close or Ctrl+W, the Excel program remains running in the background. This is useful if you have five different files open and only need to remove one. However, if you click the 'X' on the main window when only one file is open, the entire program shuts down. This can lead to confusion if you intended to keep the app open to start a new blank project.
Another common mistake is clicking "Don't Save" during the prompt. This action is permanent for the current session. Once you click "Don't Save" and the workbook closes, any data entered since the last save point is purged from the system's active memory and cannot be recovered via a simple "Undo" command. Always double-check your work before confirming a discard of changes.
Users also frequently forget to check if a workbook is shared or locked for editing by another user. If you are working on a shared network drive, you might find that you cannot close the file properly if the network connection drops, leading to "temporary owner files" (files starting with ~$) remaining in the folder even after the workbook is closed.
Tips
To speed up your workflow, utilize the AutoSave feature if you are using Microsoft 365 and saving your files to OneDrive or SharePoint. When AutoSave is toggled on (top-left corner), Excel saves your changes in real-time. This eliminates the need to interact with the "Do you want to save changes?" prompt when closing a workbook, allowing you to exit files instantly with Ctrl+W.
If you frequently work with a large set of workbooks, use the Window menu on the View tab to switch between them before closing. This ensures you are closing the correct file and not accidentally shutting down a critical report while leaving a junk file open.
For those managing complex data, it is a good habit to perform a manual save (Ctrl+S) immediately before closing. Even with AutoSave, a manual save ensures that the version you are exiting is exactly the version you intend to archive, providing a mental checkpoint that the task is complete.
Troubleshooting
If Excel freezes or refuses to close a workbook, try the following steps in order of complexity:
1. Check for Open Dialog Boxes: Often, Excel will seem "stuck" because a hidden dialog box (like a Find/Replace window or a formatting alert) is open. Press the Esc key several times or look for any flashing icons in your taskbar to find and close these pop-ups first.
2. Check for Large Calculations: If you have a workbook with thousands of complex formulas or external data links, Excel may be performing a background calculation or attempting to update links upon closing. Look at the status bar at the bottom of the window; if it says "Calculating," wait for it to finish before attempting to close again.
3. Force Quit (Last Resort): If the program is completely unresponsive and will not close via any menu or shortcut:
- On Windows: Press Ctrl + Shift + Esc to open the Task Manager. Find "Microsoft Excel" in the list, right-click it, and select End Task.
- On macOS: Press Option + Command + Esc to open the Force Quit menu. Select "Microsoft Excel" and click Force Quit.
Frequently Asked Questions
Will closing a workbook delete the file?
No. Closing a workbook only removes the file from the active memory of the Excel application. The file remains safely stored on your hard drive, cloud storage, or network server.
What is the difference between 'Close' and 'Exit'?
'Close' refers to shutting a specific spreadsheet file. 'Exit' (or quitting the app) refers to shutting down the entire Microsoft Excel software, which will simultaneously close all open workbooks.
Why does Excel ask me to save every time I close?
Excel asks to save if any change—even a tiny one like a cell selection or a formatting tweak—has occurred since the last time the file was saved. This is a safety mechanism to prevent accidental data loss.
Can I close a workbook without saving changes?
Yes. When the prompt appears, click "Don't Save." This will close the file and revert it to the state it was in at the time of the last save.
How do I close all open workbooks at once?
The fastest way to close all open workbooks is to close the Excel application itself. Click the 'X' in the top-right corner of the main program window or go to File > Exit. Excel will prompt you to save each modified workbook individually before shutting down.
Does closing a workbook stop a running macro?
Yes. If a VBA macro is currently running and you close the workbook containing that macro, the process will be terminated. Depending on the macro's design, this could leave your data in a partially updated state.