Corrupted Excel File

Posted on 2013-01-10
Last Modified: 2013-01-11
Hi there,

We have an Excel file that has become corrupted and even when trying to repair itself an error is produced.

Here is the error:

I am looking for some guidance with regards to repairing the file manually or through known Excel Recovery Software tools that are affective.

Question by:SpaceLaika
  • 2
  • 2

Expert Comment

ID: 38762882
Does this allow you in to the file?

1. Right click on the Excel file.
2. Go to Properties.
3. In General tab, at the bottom there is an area called Security, click on Unblock

Assisted Solution

arroryn earned 250 total points
ID: 38762885
Alternatively, if you have Excel 2003 available to you:

1. Open the file in Excel 2003
2. Go to File: Save
3. Change the Save As type to Web Page (.html), save and close the file
4. Open the .html file in Excel
5. Save the file as a .xls (with a new name so the original isn't lost
LVL 26

Accepted Solution

redmondb earned 250 total points
ID: 38762968
Hi, SpaceLaika.

A few questions, please...
(1) On the off chance that the data isn't confidential, please post the data here.
(2) I'm not clear - does the file open after the repair? If so, please do the following...
    (A) With the corrupt file as the active workbook, run the following code to count the no. of shapes...
Sub getShapeCount()
Dim xSheet As Worksheet
Dim xHold As String
Dim xCount As Long

For Each xSheet In ActiveWorkbook.Worksheets
    xHold = xHold & xSheet.Shapes.count & Chr(9) & & Chr(13)
    xCount = xCount + xSheet.Shapes.count

MsgBox ("Total = " & xCount & Chr(13) & Chr(13) & xHold)

End Sub

Open in new window

   (B) Assuming that the result is "reasonable" (hundreds rather than, as sometimes, hundreds of thousands), please run the following and post its output here...
Sub List_Shape_Details()
'List of buttons/shapes/pictures on all sheets in the active workbook.
'based on Shawn Foley, programming group, 1999-09-10
Dim wks As Worksheet
Dim shp As Shape
Dim nRow As Long


ActiveSheet.Range("A1:R1").Value = Array("Worksheet", "Shape", "Type", "OnAction", "Hyperlink", "TopLeft", "BotRight", "Height", "Width", _
                                         "Autoshape Type", "Form Control Type", "Index", "ID", "Text", "Formula", "Obj. ProgID", "Obj. Value", "Obj. Ticked?")
nRow = 1

Application.ScreenUpdating = False
On Error Resume Next   'hyperlinks, topLeftCell, BottomRightCell
    For Each wks In ActiveWorkbook.Worksheets
        For Each shp In wks.Shapes
            If = "Control 2" Then Stop
            nRow = nRow + 1
            Cells(nRow, 1) = "'" &
            Cells(nRow, 2) =
            Cells(nRow, 3) = shp.Type
            Cells(nRow, 4) = shp.OnAction
            Cells(nRow, 5) = shp.Hyperlink.Address
            Cells(nRow, 6) = shp.TopLeftCell.Address(0, 0)
            Cells(nRow, 7) = shp.BottomRightCell.Address(0, 0)
            Cells(nRow, 8) = shp.Height
            Cells(nRow, 9) = shp.Width
            Cells(nRow, 10) = shp.AutoShapeType
            Cells(nRow, 11) = shp.FormControlType  'i.e.  autofilter button is 2
            Cells(nRow, 12) = shp.Index
            Cells(nRow, 13) = shp.ID
            Cells(nRow, 14) = shp.TextFrame2.TextRange.text
            Cells(nRow, 15) = shp.DrawingObject.Formula
            Cells(nRow, 16) = shp.OLEFormat.Object.progID
            Cells(nRow, 17) = shp.OLEFormat.Object.Object.Value
            Cells(nRow, 18) = shp.OLEFormat.Object.Object.Checked
        Next shp
    Next wks
On Error GoTo 0
Application.ScreenUpdating = True

End Sub

Open in new window


Author Closing Comment

ID: 38766074
Thank you for the help. This question was asked on behalf of some collegues of mine which have since discovered a temporary workaround, whereby they are now saving the file in binary format in Excel 2010 .xlsb which allows them to open the file and continue to work in it. The format is VBA and Macro enabled.
LVL 26

Expert Comment

ID: 38766589
Thanks, SpaceLaika.

As you quite rightly pointed out, this may only a temporary solution as the binary rebuild, while encouraging, is no guarantee that the corruption is gone. Please feel free to remove all confidential information from the original version and post it here.


Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dynamic Excel Input Form 29 32
Left trim cells in column A Excel vba 2 28
Manipulate Range in Excel VBA 6 22
Excel - DATEDIF error #NUM 6 17
My experience with Windows 10 over a one year period and suggestions for smooth operation
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question