PC Review


Reply
Thread Tools Rate Thread

Can't open Excel files

 
 
Steve
Guest
Posts: n/a
 
      13th Oct 2008
I have a C# application (2005 .Net) which will loop thru files in a directory
and read Excel files (currently using Excel 11). There are usually multiple
Excel files in the directory. Up until a few weeks ago, it was working fine.
Now, when the the Open method is called, most of the time it returns a Null
value. If I stop the application and start it back up, it is usually able to
open up the file it had failed on before. I added in a try..catch routine to
see if an exception was thrown, but none was. Where else can I look for what
is causing the problem? Below is the Open command I am using.

Workbook workbook = application.Workbooks.Open( filePath,
false,
true,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
Missing.Value,
false,
Missing.Value,
Missing.Value);

Thanks for any help.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro: How to open not-excel-files by using excelvalue onWorkbooks.Open Filename oa? Snoopy Microsoft Excel Discussion 0 5th Mar 2009 08:26 AM
Unable to get Excel 2002 to open files from File/Open Command =?Utf-8?B?UkFD?= Microsoft Excel Crashes 0 23rd Apr 2004 06:46 PM
MS Word and Excel Files are SLOW to Open, They take 20 seconds to Open ?? JohnZ Windows XP Help 2 18th Feb 2004 06:46 AM
Excel VBA-How to open several delmited files & SaveAs Excel files waveracerr Microsoft Excel Programming 3 6th Feb 2004 04:30 PM
Excel open up with multiple workbooks created by links to other files that were not excel files James Muir Microsoft Excel Misc 0 23rd Sep 2003 02:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:12 AM.