Solved

Corrupted Excel File

Posted on 2013-01-10
5
878 Views
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:

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

Thanks,
SpaceLaika.
0
Comment
Question by:SpaceLaika
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:arroryn
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
0
 
LVL 6

Assisted Solution

by:arroryn
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
0
 
LVL 26

Accepted Solution

by:
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) & xSheet.name & Chr(13)
    xCount = xCount + xSheet.Shapes.count
Next

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
            '-- http://groups.google.com/groups?as_umsgid=7rbk95%24b44%241%40nntp8.atl.mindspring.net
Dim wks As Worksheet
Dim shp As Shape
Dim nRow As Long

Sheets.Add

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 shp.name = "Control 2" Then Stop
            nRow = nRow + 1
            Cells(nRow, 1) = "'" & wks.name
            Cells(nRow, 2) = shp.name
            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

Thanks,
Brian.
0
 

Author Closing Comment

by:SpaceLaika
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.
0
 
LVL 26

Expert Comment

by:redmondb
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.

Regards,
Brian.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Outlook Free & Paid Tools
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now