Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default C# - Excel Hangs When Opening Workbook


Hello,

I have come across a very frustrating problem in attempting some Excel automation
with C#.

I have a bit of code that allows the user to select a spreadsheet to open
and then programmatically inserts some values into it.

For some reason, though, the code hangs during the call to open the workbook.
I am running this on a Windows 2000 SP3 Workstation w/Office 2000 and developing
the code on Windows XP with Office XP in Visual C#.NET. Incidentally, it
works flawlessly on my dev machine.

Here is the code I am using. It hangs on the 3rd line.

Excel.Application exapp = new Excel.ApplicationClass();
Excel.Workbook wb = exapp.Workbooks.Open(filename,Type.Missing,Type.Mi ssing,Type.Missing,Type.Missing,Type.Missing,Type. Missing,Type.Missing,Type.Missing,Type.Missing,Typ e.Missing,Type.Missing,Type.Missing,Type.Missing,T ype.Missing,Type.Missing);

Does anyone have any ideas what this might be? I'm almost at my wits end
trying to figure out why it is hanging.

Thanks,
Chris Jones


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
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
Excel hangs on opening file Dee Excel Discussion (Misc queries) 0 February 15th 06 04:14 PM
excel exits unexpectedly or hangs the second time I open workbook r_m_i Excel Discussion (Misc queries) 0 February 9th 06 10:14 PM
Excel file hangs for several min, before opening bill Excel Discussion (Misc queries) 1 August 31st 05 07:07 PM
Excel 2003 hangs when trying to locate a workbook to open Darren Hill via OfficeKB.com Excel Discussion (Misc queries) 1 March 24th 05 12:41 PM
C# - Excel Hangs When Opening Workbook Christopher Jones Excel Programming 0 November 9th 03 10:34 AM


All times are GMT +1. The time now is 02:13 AM.

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"