Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Corrupt File Issues - Opening in 2003

For background, I run a data extraction from a repository monthly which opens
excel workbooks, extracts data and closes them. I've been doing this for at
least 2 years with no issues of corrupt files until recently.

Today I came across three workbooks that wouldn't open programmatically.
All come from the same individual. To complicate matters, the same
individual has submitted other files that open with no issue.

When I try to open the "corrupt files" using this syntax

Set oWB = XLApp.Workbooks.Open(newPath, UpdateLinks:=False, ReadOnly:=True)

I get the following error:

Run-time error '1004':

The document is corrupt and cannot be opened. To try and repair it, use the
Open and Repair command in the Open dialog (File menu) and select Extract
Data when Prompted.

When I open these files again directly from the source without the code, two
of them open with no problems. When I ran the data extraction again, these
same two files opened programmatically with no error.

No matter what I do with the third file, it always gives me a corrupt
message when it's opened.

I just discovered that another file that I didn't have problems opening this
month from the same source, was corrupt last month when I did this data
extraction. The common thread seems to be the source.

I'm kind of at a loss to know what to do next. I'm on 2003 and the source
is also on 2003. He's not converted to 2007. Has anyone else seen this
kind of behavior and if so, where should I go next?

Thanks,
Barb Reinhardt


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Corrupt File Issues - Opening in 2003

I'd ask the sender to resend those troublesome workbook files.

Maybe the workbook is on the "cusp" of corruption and only causes problems
sometimes????

Maybe you could try opening (and saving as a new name on different pc's--or even
in different versions of excel).

Or maybe you could try openoffice:
http://www.openoffice.org, a 60-104 meg download or a CD

It's been known to save both data, formatting, and code from files that excel
couldn't.

Barb Reinhardt wrote:

For background, I run a data extraction from a repository monthly which opens
excel workbooks, extracts data and closes them. I've been doing this for at
least 2 years with no issues of corrupt files until recently.

Today I came across three workbooks that wouldn't open programmatically.
All come from the same individual. To complicate matters, the same
individual has submitted other files that open with no issue.

When I try to open the "corrupt files" using this syntax

Set oWB = XLApp.Workbooks.Open(newPath, UpdateLinks:=False, ReadOnly:=True)

I get the following error:

Run-time error '1004':

The document is corrupt and cannot be opened. To try and repair it, use the
Open and Repair command in the Open dialog (File menu) and select Extract
Data when Prompted.

When I open these files again directly from the source without the code, two
of them open with no problems. When I ran the data extraction again, these
same two files opened programmatically with no error.

No matter what I do with the third file, it always gives me a corrupt
message when it's opened.

I just discovered that another file that I didn't have problems opening this
month from the same source, was corrupt last month when I did this data
extraction. The common thread seems to be the source.

I'm kind of at a loss to know what to do next. I'm on 2003 and the source
is also on 2003. He's not converted to 2007. Has anyone else seen this
kind of behavior and if so, where should I go next?

Thanks,
Barb Reinhardt


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Corrupt File Issues - Opening in 2003

Dave,

I've seen 4 different files from the same individual show at one time as
corrupt. Could this be a problem with his installation of Excel or
something else? I've not seen any others that are corrupt and I've probably
extracted data from 2000 workbooks over the last 2 years.

Thanks,
Barb


"Dave Peterson" wrote:

I'd ask the sender to resend those troublesome workbook files.

Maybe the workbook is on the "cusp" of corruption and only causes problems
sometimes????

Maybe you could try opening (and saving as a new name on different pc's--or even
in different versions of excel).

Or maybe you could try openoffice:
http://www.openoffice.org, a 60-104 meg download or a CD

It's been known to save both data, formatting, and code from files that excel
couldn't.

Barb Reinhardt wrote:

For background, I run a data extraction from a repository monthly which opens
excel workbooks, extracts data and closes them. I've been doing this for at
least 2 years with no issues of corrupt files until recently.

Today I came across three workbooks that wouldn't open programmatically.
All come from the same individual. To complicate matters, the same
individual has submitted other files that open with no issue.

When I try to open the "corrupt files" using this syntax

Set oWB = XLApp.Workbooks.Open(newPath, UpdateLinks:=False, ReadOnly:=True)

I get the following error:

Run-time error '1004':

The document is corrupt and cannot be opened. To try and repair it, use the
Open and Repair command in the Open dialog (File menu) and select Extract
Data when Prompted.

When I open these files again directly from the source without the code, two
of them open with no problems. When I ran the data extraction again, these
same two files opened programmatically with no error.

No matter what I do with the third file, it always gives me a corrupt
message when it's opened.

I just discovered that another file that I didn't have problems opening this
month from the same source, was corrupt last month when I did this data
extraction. The common thread seems to be the source.

I'm kind of at a loss to know what to do next. I'm on 2003 and the source
is also on 2003. He's not converted to 2007. Has anyone else seen this
kind of behavior and if so, where should I go next?

Thanks,
Barb Reinhardt


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Corrupt File Issues - Opening in 2003

I'm not sure what the cause is. Maybe the 4 different files were based on one
workbook that was "close" to being corrupted (whatever close means).

And the others were based on a different workbook.

Or maybe something bad happened when the file was sent???

The only time I've seen a corrupt workbook had one worksheet that was bad. I
could remove that worksheet and rebuilt it and then everything went back to
being ok.

I don't know what caused it, but there were lots and lots of comments and lots
and lots of different formatting. So I stay away from using those features (to
excess, that is).



Barb Reinhardt wrote:

Dave,

I've seen 4 different files from the same individual show at one time as
corrupt. Could this be a problem with his installation of Excel or
something else? I've not seen any others that are corrupt and I've probably
extracted data from 2000 workbooks over the last 2 years.

Thanks,
Barb

"Dave Peterson" wrote:

I'd ask the sender to resend those troublesome workbook files.

Maybe the workbook is on the "cusp" of corruption and only causes problems
sometimes????

Maybe you could try opening (and saving as a new name on different pc's--or even
in different versions of excel).

Or maybe you could try openoffice:
http://www.openoffice.org, a 60-104 meg download or a CD

It's been known to save both data, formatting, and code from files that excel
couldn't.

Barb Reinhardt wrote:

For background, I run a data extraction from a repository monthly which opens
excel workbooks, extracts data and closes them. I've been doing this for at
least 2 years with no issues of corrupt files until recently.

Today I came across three workbooks that wouldn't open programmatically.
All come from the same individual. To complicate matters, the same
individual has submitted other files that open with no issue.

When I try to open the "corrupt files" using this syntax

Set oWB = XLApp.Workbooks.Open(newPath, UpdateLinks:=False, ReadOnly:=True)

I get the following error:

Run-time error '1004':

The document is corrupt and cannot be opened. To try and repair it, use the
Open and Repair command in the Open dialog (File menu) and select Extract
Data when Prompted.

When I open these files again directly from the source without the code, two
of them open with no problems. When I ran the data extraction again, these
same two files opened programmatically with no error.

No matter what I do with the third file, it always gives me a corrupt
message when it's opened.

I just discovered that another file that I didn't have problems opening this
month from the same source, was corrupt last month when I did this data
extraction. The common thread seems to be the source.

I'm kind of at a loss to know what to do next. I'm on 2003 and the source
is also on 2003. He's not converted to 2007. Has anyone else seen this
kind of behavior and if so, where should I go next?

Thanks,
Barb Reinhardt


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
any special trick to opening up corrupt XLS files Hillary Excel Discussion (Misc queries) 3 November 26th 09 06:35 PM
Opening file in Excel 2003 opens multipule instances of same file Ed_B Excel Discussion (Misc queries) 1 June 21st 07 07:10 PM
Issues with opening DBF (dBase) file in Excel EuroMaverick Excel Discussion (Misc queries) 1 February 15th 06 04:15 PM
Issues in Opening a file Manish Bajpai Excel Worksheet Functions 0 January 17th 06 02:45 PM
Do I have a corrupt shared Excel 2003 File? sdsti Excel Worksheet Functions 0 August 23rd 05 05:25 PM


All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"