LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.automation
external usenet poster
 
Posts: 3
Default Excel interop from c#

Hi, hope you can shed some light.

I have a C# app which does some Excel interop. I didn't write the app
and I got e-mailed the executable which is used in production.

I then went and found the source code for it.

Now this thing directly references a Excel.dll (version 1.2.0.0) and
there's also an Office.dll (version 2.2.0.0), which I assume is used
by the Excel dll.

Same scenario with the project file.

When I run the production executable, it works just fine and dandy.

However, when I run the app from Visual Studio (this is 2003 - .NET
1.1), it throws the wonderful error "Exception from HRESULT:
0x800A03EC." when the following code runs:

System.Reflection.Missing missing = System.Reflection.Missing.Value;
Excel.Application app = new Excel.ApplicationClass();
workbook =
app.Workbooks.Open(fileName,updateLinks,readOnly,m issing,missing,missing,true,missing,missing,missin g,missing,missing,false);

After some extensive googling I have found that the most common cause
for this is a US English version of Office running on a non-US English
version of Windows (mine is South African English). So I promtly
changed my regional settings to US-English, I even programatically
changed the thread's CultureInfo to en-US, as explained somewhere on
MSDN. Still I get the error.

I tried changing the references in the project to the interop dlls in
the GAC, still nothing.

There are a few other COMException error descriptions which correspond
to the same HRESULT, which to me is a bit puzzling, but anyway, that's
the most detailed error description I get... "Exception from HRESULT:
0x800A03EC."

I am sitting here pulling my hair out... if anyone has any idea what's
up... I would be eternally grateful...

Cheers!

 
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
Immediate Fail: Launch Excel via Interop Doug Price Excel Discussion (Misc queries) 0 January 22nd 10 04:34 PM
PIA interop Excel - VB.net accessing Cell Chris Le Roquais Excel Programming 0 December 19th 06 08:52 PM
Export image from Excel using interop Ksım GÜLCAN Excel Programming 0 July 29th 06 11:44 AM
Excel interop versions Maik Excel Programming 2 May 16th 05 09:32 PM
Excel 2003 COM interop problems Matt Storz Excel Programming 2 December 7th 04 04:47 PM


All times are GMT +1. The time now is 09:50 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"