Microsoft KB Archive/291057

= How to recover data from damaged Excel 2002 workbooks =

PSS ID Number: 291057

Article Last Modified on 10/5/2004

-

The information in this article applies to:


 * Microsoft Excel 2002

-



This article was previously published under Q291057





For a Microsoft Office Excel 2003 version of this article, see 820741.

For a Microsoft Excel 2000 version of this article, see 179871.

For a Microsoft Excel 98 and earlier version of this article, see 142117.



SUMMARY
There are several methods that you can use to recover information from damaged or corrupted files. This article discusses those methods and points you to other Microsoft Knowledge Base articles that discuss the methods in greater detail.

Methods for Recovering Data in Corrupted Microsoft Excel Files

 * Use a recovered copy of the document.
 * Use the Open and Repair command.
 * Save the file in Hypertext Markup Language (HTML) format.
 * Use external references to link to the corrupted file.
 * If you can open the file, save it in the SYLK format.
 * Use the Revert To Saved Document command.
 * If a chart is linked to the corrupted file, use a macro to extract the data.
 * Use the Microsoft Excel File Recovery Macro.
 * Open the file in Microsoft Word.
 * Open the file in Microsoft Excel Viewer.



Use a Recovered Copy of the Document
If Microsoft Excel stops responding while you are working in your workbook, use the Microsoft Office Application Recovery program to recover Excel and your workbook. To do this, follow these steps:
 * 1) Click Start, point to Programs, point to Microsoft Office Tools, and then click Microsoft Office Application Recovery.
 * 2) In the Application list, click Microsoft Excel, and then click Recover Application.

NOTE: If you click End Application, recent changes to your workbook are lost.
 * 1) Open Excel.

The files listed in the Document Recovery task pane include your recovered workbook.
 * 1) To open or save your workbook, click the arrow next to the workbook in the task pane.

For additional information about Excel AutoRecover functions, click the article number below to view the article in the Microsoft Knowledge Base:

289273 XL2002: Overview of AutoRecover Functions

Use the &quot;Open and Repair&quot; Command
 Start Excel. On the File menu, click Open. In the Open dialog box, select the file that you want to open. Click the arrow on the Open button and then click Open and Repair. When you are prompted, click Repair to try to recover your most recent changes.

NOTE: If Excel is unable to repair your workbook, click Extract Data instead of Repair.  If your workbook contains formulas, Excel prompts you to choose whether to Convert to Values or Recover Formulas. If you receive the following error message, click Yes.

The document  caused a serious error the last time it was opened. Would you like to continue opening it?

For additional information about this error message, click the following article number to view the article in the Microsoft Knowledge Base:

286017 You receive an &quot;The document 'Filename' caused a serious error the last time it was opened .Would you like to continue opening it?&quot; error message when you open a file in Excel or in Word

</ol> </li> Save your recovered workbook.</li></ol>

Save the File in Hypertext Markup Language (HTML) Format
If you can open the corrupted Microsoft Excel file, you can &quot;filter&quot; it if you save it in HTML format, close the file, and then reopen it. To do this, follow these steps:
 * 1) On the File menu, click Save as Web Page.
 * 2) Under Save, click Entire Workbook, and then click Save.
 * 3) Close the file.
 * 4) Open the file again in Excel.
 * 5) On the File menu, click Save As. In the Save as type list, click Microsoft Excel Workbook. Change the name of the file to create a new &quot;filtered&quot; copy without replacing the original.

NOTE: Some features may be lost when you save in HTML format. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

300637 XL2002: Some Workbook Features Not Retained When Saving as a Web Page

Use External References to Recover Data
The most common method to recover information from a damaged file is to extract the values from the file by using external references to link to the file. The file structure must be complete; otherwise, Microsoft Excel cannot read the information.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

300638 Linking to Data in a Damaged File

Save the File in the SYLK Format
If you can open the corrupted Microsoft Excel file, you can &quot;filter&quot; it by saving the file in the SYLK format, closing the file, and then reopening it.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

300639 How To Handle Corrupted Excel Files by Saving Them in the SYLK Format

Use the Revert To Saved Document Command to Recover Data
If you are editing a Microsoft Excel worksheet and the file accidentally becomes corrupted before you have saved changes to the file, you can recover the original worksheet by doing the following:


 * 1) On the File menu, click Open and select the name of the file that you are editing. Note that a dialog box appears with the message &quot;Revert to Saved Document?&quot;
 * 2) Click OK.

The file that you are editing reverts to the last saved version of the file.

Use a Macro to Extract the Data in a Chart
In Microsoft Excel versions 5.0 and later, data may be retrieved from a chart, even when the data is in an external worksheet or workbook. This behavior can be useful in situations where the chart was created from or linked to another file that is unavailable or has been damaged in some way.

When the source data to a chart is lost, you can still retrieve the data from the chart itself by using a Visual Basic for Applications (VBA) macro.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

300643 XL2002: Macro to Extract Data from a Chart

Use the Microsoft Excel File Recovery Macro to Recover Information
If you can open the workbook in Microsoft Excel, you can use the Microsoft Excel File Recovery Macro to re-create Excel worksheets, XLM macro sheets, and module sheets in a new workbook. This macro also creates a log file so that you can identify items that cause problems when you use the macro to transfer them to the new worksheet. If the Microsoft Excel File Recovery Macro fails, view the last entry in the log file to determine which item causes the problem, and then re-create the workbook without that item.

NOTE: If you want to re-create your VBA components in your workbook, click to select the Trust access to Visual Basic Project check box before you run this macro. (On the Tools menu, point to Macro, and then click Security; click the Trusted Sources tab.)

To find information about this macro, or to download this macro, go to the Office Resource Kit that is located at the following Microsoft Web site:

http://www.microsoft.com/office/ork/

Open the File in Microsoft Word or WordPad
If you have the Microsoft Excel converter installed, you may be able to open your Microsoft Excel workbook in Microsoft Word. If the file does open in Microsoft Word, you will not be able to recover module sheets, dialog sheets, chart sheets, macro sheets, or any embedded charts. Also, you will not recover any cell formulas, just the results of those formulas that are currently in the cells.

You can also open your Microsoft Excel workbook in WordPad. If the file does open, you may be able to recover Visual Basic code in your modules and class modules. Search for the words &quot;Sub&quot; or &quot;Function&quot; to find your code.

Open the File in Microsoft Excel Viewer
If Microsoft Excel Viewer is installed, you may be able to open the Microsoft Excel workbook in Microsoft Excel Viewer, copy the cells, and paste the cells into a new workbook. However, you cannot recover module sheets, dialog sheets, chart sheets, or macro sheets. Also, you cannot recover any cell formulas; you can recover only the results of the formulas that are currently in the cells.

For more information about Microsoft Excel Viewer, go to the following Microsoft Web site:

http://office.microsoft.com/downloads/2000/xlviewer.aspx

Additional query words: corrupt corruption inf XL2002

Keywords: kbcorrupt kbhowto KB291057

Technology: kbExcel2002 kbExcel2002Search kbExcelSearch kbExcelWinSearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.