Repair a corrupted workbook

When Microsoft Excel detects a corrupted workbook upon opening, it automatically starts File Recovery mode and attempts to repair the workbook. If File Recovery mode doesn’t start, try using this manual process to recover your workbook:

  1. Click File > Open.
  2. Click the location and folder that contains the corrupted workbook.
  3. In the Open dialog box, select the corrupted workbook.
  4. Click the arrow next to the Open button, and then click Open and Repair.

Open and repair command

  1. To recover as much of the workbook data as possible, pick Repair.

If Repair isn’t able to recover your data, pick Extract Data to extract values and formulas from the workbook.

If neither automatic nor manual repair works, there are some recovery methods that might help salvage your data. You can also take some preventive measures to avoid losing your work by automatically saving a backup copy of your workbook or creating a recovery file from time to time.



Recover data from a corrupted workbook

Choose one of the following methods to help recover your data. If it’s not successful, try another method. You can also try third-party software solutions to try to recover workbook.

 Important   If a disk error or network error prevents you from opening a workbook, move the workbook to a different hard disk drive or a local disk before trying any of the following recovery options.

Recover data when the workbook is open in Excel

  • Revert the workbook to the last saved version    If a workbook becomes corrupted while you work but before you save your changes, you can revert your workbook to the last saved version:
  1. Click File > Open.
  2. Double-click the name of the workbook that you have open in Excel.
  3. Click Yes to reopen the workbook.

The workbook opens without any changes you made that might have caused the workbook to become corrupted.

  • Save the workbook in SYLK (Symbolic Link) format    In SYLK file format, you may be able to filter out the corrupted elements. This file format is typically used to remove printer corruption. Only the active sheet in a workbook can be saved in the SYLK file format.
  1. Click the worksheet that contains the data you want to recover.
  2. Click File > Export.
  3. Under Export, click Change File Type.
  4. Under Other file types, double-click Save as Another File Type.
  5. In the Save as type list, click SYLK (Symbolic Link), and then click Save.

Click OK to save the active sheet if you get a message that the selected file type doesn’t support workbooks with multiple sheets.

Click Yes if you get a message that the workbook contains features that aren’t supported in the SYLK format.

  1. Click File > Open.
  2. Under Recent Workbooks, double-click the .slk file you saved to open it.
  3. Click File > Export.
  4. Under Export, click Change File Type.
  5. Under Workbook File Types box, double-click Workbook.
  6. In the File name box, type the name you want to use for the workbook to create a copy without replacing the original workbook, and then click Save.
  7. Repeat all steps for each worksheet that contains data you want to recover.

Recover data when you can't open the workbook in Excel

  • Set the calculation option in Excel to manual    Try changing the calculation setting from automatic to manual. Because the workbook won't be recalculated, it may open.
  1. Click File > New.
  2. Under New, click Blank workbook.
  3. Click File > Options.
  4. In the Formulas category, under Calculation options, pick Manual, and then click OK.
  5. Click File > Open.
  6. Locate and then double-click the corrupted workbook to open it.
  • Use external references to link to the corrupted workbook    To retrieve only data and not formulas or calculated values from the workbook, try using external references to link to the corrupted workbook.
  1. Click File > Open.
  2. Go to the folder that contains the corrupted workbook.
  3. Right-click the file name of the corrupted workbook, click Copy, and then click Cancel.
  4. Click File > New.
  5. Under New, click Blank workbook.
  6. 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 3, and then press Enter.

 Note    You have to enter only the name of the workbook—you don’t have to type the file name extension.

  1. If the Update Values dialog box appears, select the corrupted workbook, and then click OK.
  2. If the Select Sheet dialog box appears, select the appropriate sheet, and then click OK.
  3. Select cell A1.
  4. Click Home > Copy, or press Ctrl+C.
  5. 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.
  6. Click Home > Paste, or press Ctrl+V.
  7. With the range of cells still selected, click Home > Copy again, or press Ctrl+C.
  8. Click Home > the arrow below Paste, and then under Paste Values, click Values.

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, try using a macro to extract the source data of the chart.
  1. Copy the following macro code and paste it 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
  1. Insert or delete a worksheet into your workbook right-click its sheet tab, and then rename it ChartData.
  2. 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.

  1. Run the GetChartValues macro.
  2. The data from the chart is put on the ChartData worksheet.

Top of Page Top of Page

Automatically save a backup copy of a workbook

With a backup copy of your workbook, you'll always have access to your data if your workbook is deleted accidentally or if it becomes corrupted.

  1. Click File > Save As.
  2. Click Computer, and then click the Browse button.

Browse button

  1. In the Save As dialog box, click the arrow next to Tools, and then click General Options.

General Options on the Tools menu

  1. In the General Options dialog box, check the Always create backup box.

Always create backup option in the General Options dialog box

Top of Page Top of Page

Automatically create a recovery file at set intervals

A recovery file of your workbook also helps ensure you'll have access to your data if your workbook is deleted accidentally or if it becomes corrupted.

  1. Click File > Options.
  2. In the Save category, under Save workbooks, check the Save AutoRecover information every box, and then enter a number of minutes. (The default is 10.)

AutoRecover option on the Save tab in the Excel Options dialog box

  1. In the AutoRecover file location box, enter the location where you want to save the recovery file.
  2. Make sure that the Disable AutoRecover for this workbook only box is unchecked.

Top of Page Top of Page

 
 
Applies to:
Excel 2013