ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   C# - Excel Hangs When Opening Workbook (https://www.excelbanter.com/excel-programming/281951-c-excel-hangs-when-opening-workbook.html)

Christopher Jones

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 Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com