Repairing a corrupted workbook
When you open a workbook that has been corrupted, Microsoft Office Excel automatically starts File Recovery mode and attempts to reopen and simultaneously repair the workbook.
Excel cannot always start File Recovery mode automatically. If you cannot open a workbook because it has been corrupted, you can try to repair the workbook manually.
You can also try other methods to recover workbook data when repairing a workbook is not successful. As a preventive measure, you may want to save your workbook often and create a backup copy every time that you save it. Or you can specify that Excel automatically creates a recovery file at specific intervals. This way, you will have access to a good copy of the workbook, if the original is deleted accidentally or if it becomes corrupted.What do you want to do?
Repair a corrupted workbook manually
Recover data from a corrupted workbook
Automatically save a backup copy of a workbook
Automatically create a recovery file at specific intervals
Repair a corrupted workbook manually
- Click the
Microsoft Office Button
, and then click Open. - In the Open dialog box, select the corrupted workbook that you want to open.
- Click the arrow next to the
Openbutton, and then clickOpen and Repair. - Do one of the following:
- To recover as much of the workbook data as possible, click
Repair. - To extract values and formulas from the workbook when an attempt to repair the workbook is not successful, click
Extract Data.
- To recover as much of the workbook data as possible, click
Recover data from a corrupted workbook
The following methods may help you to salvage data that might otherwise be lost. If one method is not successful, you can try another. You can also try third-party software solutions to try to recover workbook data if you cannot recover your data by using these methods.
Important If a disk error or network error makes it impossible to open a workbook, move the workbook to a different hard disk drive or from the network to a local disk before you spend time trying any of the following recovery options.
- To recover data when the workbook is open in Excel, do one of the following:
- Revert the workbook to the last saved version If you are editing a worksheet and the workbook becomes corrupted before you save your changes, you can recover the original worksheet by reverting it to the last saved version.
To revert the workbook to the last saved version, do the following:
- Click the
Microsoft Office Button
, and then click Open. - Double-click the name of the workbook that you have open in Excel.
- Click
Yesto reopen the workbook.Note The workbook reverts to the last saved version of the workbook. Any changes that may have caused the workbook to become corrupted have been discarded.
- Click the
- Save the workbook in SYLK (Symbolic Link) format By saving the workbook in SYLK format, you may be able to filter out the corrupted elements. SYLK format is typically used to remove printer corruption.
To save the workbook in SYLK format, do the following:
- Click the
Microsoft Office Button
, and then point to the arrow next to Save As. - In the
Save as typelist, clickSYLK (Symbolic Link), and then clickSave.Note Only the active sheet in the workbook is saved when you use the SYLK file format.
- If a message prompts you that the selected file type does not support workbooks that contain multiple sheets, click
OKto save only the active sheet. - If a message prompts you that the workbook may contain features that are not compatible with the SYLK format, click
Yes. - Click the
Microsoft Office Button
, and then click Close. - If a message prompts you to save the changes that you made, click
Yes. - Click the
Microsoft Office Button
, and then click Open. - Select the .slk file that you saved, and then click
Open.Note To see the .slk file, you may need to click
All FilesorSYLK Filesin theFiles of typelist. - Click the
Microsoft Office Button
, and then point to the arrow next to Save As. - In the
Save as typebox, clickExcel Workbook. - In the
File namebox, type a new name for the workbook to create a copy without replacing the original workbook, and then clickSave.Note Because this format saves only the active worksheet in the workbook, you must open the corrupted workbook repeatedly and save each worksheet separately.
- Click the
- Save the workbook in Hypertext Markup Language (HTML) format By saving the workbook in HTML format, you may be able to filter out the corrupted elements.
To save the workbook in HTML format, do the following:
- Click the
Microsoft Office Button
, and then point to the arrow next to Save As. - In the
Save as typelist, clickWeb Page. - Click
Publish. - Under
Items to publish, in theChoosebox, clickEntire Workbook, and then clickPublish. - Click the
Microsoft Office Button
, and then click Close. - Click the
Microsoft Office Button
, and then click Open. - Select the HTML document that you saved, and then click
Open.Note To see all HTML documents, you may need to click
All FilesorAll Web Pagesin theFiles of typelist. - Click the
Microsoft Office Button
, and then point to the arrow next to Save As. - In the
Save as typelist, clickExcel Workbook. - In the
File namebox, type a new name for the workbook to create a copy without replacing the original workbook, and then clickSave.Note Some features may be lost when you save a workbook in HTML format.
- Click the
- Revert the workbook to the last saved version If you are editing a worksheet and the workbook becomes corrupted before you save your changes, you can recover the original worksheet by reverting it to the last saved version.
- To recover the data when you cannot open the workbook in Excel, do one of the following:
- Set the calculation option in Excel to manual To open a workbook, try changing the calculation setting from automatic to manual. Because the workbook won't be recalculated, it may open.
To set the calculation option in Excel to manual, do the following:
- Make sure that a new, blank workbook is open in Excel. If a new, blank workbook is not open, do the following:
- Click the
Microsoft Office Button
, and then click New. - Under
New Blank, clickBlank document.
- Click the
- Click the
Microsoft Office Button
, and then click Excel Options. - In the
Formulascategory, underCalculationoptions, clickManually. - Click
OK. - Click the
Microsoft Office Button
, and then click Open. - Select the corrupted workbook, and then click
Open.
- Make sure that a new, blank workbook is open in Excel. If a new, blank workbook is not open, do the following:
- Use external references to link to the corrupted workbook If you want to retrieve only data and not formulas or values from the workbook, you can use external references to link to the corrupted workbook.
To use external references to link to the corrupted workbook, do the following:
- Click the
Microsoft Office Button
, and then click Open. - In the
Look inbox, select the folder that contains the corrupted workbook, and then clickCancel. - Click the
Microsoft Office Button
, and then click New. - Under
New Blank, clickBlank document. - In cell A1 of the new workbook, type =File Name!A1, where File Name is the name of the corrupted workbook, and then press ENTER.
Tip You have to enter only the name of the workbook - you do not have to type the extension.
- Click the workbook, and then click
OK. - If the
Select Sheetdialog box appears, select the appropriate sheet, and then clickOK. - Select cell A1.
- On the
Hometab, in theClipboardgroup, clickCopy.Keyboard shortcut You can also press CTRL+C.
- Select an area that is approximately the same size as the range of cells that contain data in the corrupted workbook.
- On the
Hometab, in theClipboardgroup, clickPaste.Keyboard shortcut You can also press CTRL+V.
- With the range of cells still selected, on the
Hometab, in theClipboardgroup, clickCopyagain.Keyboard shortcut You can also press CTRL+C.
- On the
Hometab, in theClipboardgroup, click the arrow belowPaste, and then clickPaste Special. - Under
Paste, selectValues, and then clickOK.Note Pasting values removes the links to the corrupted workbook and leaves only the data.
- Click the
- Open the corrupted workbook in Microsoft Office Word or Microsoft WordPad If you have the Microsoft Office Excel converter installed, you might be able to open the workbook in Word. If the workbook opens in Word, you can recover the data. You cannot use this method to recover module sheets, dialog sheets, chart sheets, macro sheets, or any embedded charts. You won't be able to recover cell formulas either. You can recover only the results of those formulas that are currently displayed in the cells of the corrupted workbook.
You can also open your Excel workbook in WordPad. If the workbook does open, you may be able to recover the Microsoft Visual Basic code in your modules and class modules. You can search for the words "Sub" or "Function" to find your code.
- Use a macro to extract data from a corrupted workbook If a chart is linked to the corrupted workbook, you can use a macro to extract the source data of the chart.
To use a macro, do the following:
- Enter the following macro code in a module sheet:
Sub GetChartValues97() Dim NumberOfRows As Integer Dim X As Object Counter = 2 ' Calculate the number of rows of data. NumberOfRows = UBound(ActiveChart.SeriesCollection(1).Values) Worksheets("ChartData").Cells(1, 1) = "X Values" ' Write x-axis values to worksheet. With Worksheets("ChartData") .Range(.Cells(2, 1), _ .Cells(NumberOfRows + 1, 1)) = _ Application.Transpose(ActiveChart.SeriesCollection(1).XValues) End With ' Loop through all series in the chart and write their values to ' the worksheet. For Each X In ActiveChart.SeriesCollection Worksheets("ChartData").Cells(1, Counter) = X.Name With Worksheets("ChartData") .Range(.Cells(2, Counter), _ .Cells(NumberOfRows + 1, Counter)) = _ Application.Transpose(X.Values) End With Counter = Counter + 1 Next End Sub - Insert a new worksheet into your workbook and rename it ChartData.
- Select the chart from which you want to extract the underlying data values.
Note The chart can be embedded on a worksheet or on a separate chart sheet.
- Run the GetChartValues97 macro.
The data from the chart will be placed on the ChartData worksheet.
- Enter the following macro code in a module sheet:
- Set the calculation option in Excel to manual To open a workbook, try changing the calculation setting from automatic to manual. Because the workbook won't be recalculated, it may open.
Automatically save a backup copy of a workbook
- Click the
Microsoft Office Button
, and then point to the arrow next to Save As. - Click the arrow next to
Tools, and then clickGeneral Options. - Select the
Always create backupcheck box.
Automatically create a recovery file at specific intervals
- Click the
Microsoft Office Button
, and then click Excel Options. - In the
Savecategory, underPreserve backup information for your workbooks, select theSave AutoRecover information everycheck box, and then enter a number of minutes. - In the
AutoRecover file locationbox, enter the location where you want to save the recovery file. - Make sure that the
Disable AutoRecover for this workbook onlycheck box is not selected.
![]()