Excel file closes prog

G

Guest

When opening an excel file either by clicking filename, running at command prompt or within the application excel closes straight down. This only happens with one particular file which is under 1mb has no macros or any other special functions. As this is a very important file can anyone help please.
 
J

Jan Karel Pieterse

Hi Vivien,
As this is a very important file can anyone help please.


Options to try and open a corrupt file

- Set calculation to manual
- open the file, but disable macros (assuming you've set macro security
to medium: Tools, Macro, security)
- As soon as you've clicked the disable macros button, press
control-pageup or control-pagedown, thus changing sheets.

If that does not work, try creating a link to the file:

='c:\my documents\[MyFileName.xls]Sheet1'!A1

and copy right and down. This at least gets you the worksheets values.

if you don't know the sheet names, enter this:

='C:\PathToFile\[MyFileName.xls]'!A1

and press enter

If XL (2000) is able to extract them, it will prompt you for a sheet
name.

Sometimes the Excel viewer, Word or even Internet explorer (v5) enables
you to open the file and copy information out of it.

If the file is not protected, maybe you can open it with OpenOffice
(www.Openoffice.org).

Also, Excel XP can sometimes repair XL files with trouble.

Finally, sometimes a corrupt file that still can be opened,
can be cured using this method (XL2000 or up):

- Open the file
- Save-as filetype Webpage
- close the file
- Open the html file
- save-as normal Excel workbook.



Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com
 
R

Robert Rosenberg

If you don't have Excel XP or newer, find someone who does and try opening
the file using those versions. In addition, Excel XP and 2003 has a VBA
(macros) Open method with a new argument called "CorruptLoad". This allows
you to open a possibly corrupt file in one of three ways and mimicks Excel's
"AutoRecovery" feature introduced in Excel XP.

If Excel XP/2003 doesn't open the file by itself, try using this macro (in
those versions) to open your file:

Sub OpenCorruptExcelFile()
'Replace "C:\My Documents\YourFile.xls" with the path and filename to
your workbook
'Also, try using "xlExtractData" if xlRepairFile doesn't work.
' The xlRepairFile option will attempt to repair the corruption and
' display a dialog listing the repairs as well as a link to a text file
Workbooks.Open Filename:="C:\My Documents\YourFile.xls", _
CorruptLoad:=xlExtractData

End Sub

--
_______________________
Robert Rosenberg
R-COR Consulting Services
Microsoft MVP - Excel


Vivien said:
When opening an excel file either by clicking filename, running at command
prompt or within the application excel closes straight down. This only
happens with one particular file which is under 1mb has no macros or any
other special functions. As this is a very important file can anyone help
please.
 
B

Bob D

I had the same problem with a file in Excel 2000 this
weekend. After numerous tries to fix the problem, I went
into Explorer and renamed the file. I was then able to
open it under the new name. I know this seems to be too
easy, but it did work.

Bob D
-----Original Message-----
When opening an excel file either by clicking filename,
running at command prompt or within the application excel
closes straight down. This only happens with one
particular file which is under 1mb has no macros or any
other special functions. As this is a very important file
can anyone help please.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top