LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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


 
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 04:09 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"