When you open a workbook that has been corrupted, 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.
Repair a corrupted workbook manually
-
On the File tab, click Open.
-
In Excel 2013 or Excel 2016, click on the location where the spreadsheet is located, and click Browse.
-
In the Open dialog box, select the corrupted workbook that you want to open.
-
Click the arrow next to the Open button, and then click Open 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.
-
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:
-
On the File tab, click Open.
-
Double-click the name of the workbook that you have open in Excel.
-
Click Yes to 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. For more information on recovering earlier versions of a workbook, see Automatically save and recover Office files.
-
-
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 File tab, and then click Save As.
-
In the Save as type list, click SYLK (Symbolic Link), and then click Save.
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 OK to 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.
-
On the File tab, 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 Files or SYLK Files in the Files of type list.
-
On the File tab, click Save As.
-
In the Save as type box, click Excel Workbook.
-
In the File name box, type a new name for the workbook to create a copy without replacing the original workbook, and then click Save.
Note: Because this format saves only the active worksheet in the workbook, you must open the corrupted workbook repeatedly and save each worksheet separately.
-
-
-
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:
-
-
On the File tab, click New.
-
Under Available Templates, click Blank workbook.
-
On the File tab, click Options.
-
In the Formulas category, under Calculation options, click Manual.
-
Click OK.
-
On the File tab, click Open.
-
Select the corrupted workbook, and then click Open.
-
-
Use external references to link to the corrupted workbook If you want to retrieve only data and not formulas or calculated 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:
-
On the File tab, click Open.
-
Select the folder that contains the corrupted workbook, copy the file name of the corrupted workbook, and then click Cancel.
-
Click the File tab, and then click New.
-
Under Available Templates, click Blank workbook.
-
In cell A1 of the new workbook, type =File Name!A1, where File Name is the name of the corrupted workbook that you copied in step 2, and then press ENTER.
Tip: You have to enter only the name of the workbook — you do not have to type the file name extension.
-
If the Update Values dialog box appears, select the corrupted workbook, and click OK.
-
If the Select Sheet dialog box appears, select the appropriate sheet, and then click OK.
-
Select cell A1.
-
On the Home tab, in the Clipboard group, click Copy.
-
Select an area, starting in cell A1, that is approximately the same size as the range of cells that contain data in the corrupted workbook.
-
On the Home tab, in the Clipboard group, click Paste.
-
With the range of cells still selected, on the Home tab, in the Clipboard group, click Copy again.
-
On the Home tab, in the Clipboard group, click the arrow below Paste, and then under Paste Values, click Values.
Note: Pasting values removes the links to the corrupted workbook and leaves only the data.
-
-
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 GetChartValues() 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 GetChartValues macro.
-
The data from the chart will be placed on the ChartData worksheet.
-
-
Automatically save a backup copy of a workbook
Automatically saving a backup copy of your workbook helps to ensure that you will have access to a good copy of the workbook, if the original is deleted accidentally or if it becomes corrupted.
-
On the File tab, click Save As.
-
In Excel 2013 or Excel 2016, click on the location where the spreadsheet is located, and click Browse.
-
Click the dropdown arrow next to Tools, located next to the Save button, and then click General Options.
-
Select the Always create backup check box.
For more information on saving and recovering earlier versions of a workbook, as well as information on recovering new workbooks (that you had not previously saved), see Recover Office files.
Automatically create a recovery file at specific intervals
Configuring Excel to periodically create a recovery file of your workbook helps to ensure that you will have access to a good copy of the workbook, if the original is deleted accidentally or if it becomes corrupted.
-
On the File tab, click Options.
-
In the Save category, under Save workbooks, select the Save AutoRecover information every check box, and then enter a number of minutes.
-
In the AutoRecover file location box, enter the location where you want to save the recovery file.
-
Make sure that the Disable AutoRecover for this workbook only check box is not selected.
For more information on saving and recovering earlier versions of a workbook, as well as information on recovering new workbooks (that you had not previously saved), see Recover Office files.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
No comments:
Post a Comment