+ Reply to Thread
Results 1 to 13 of 13

Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    i have delevloped an applicatin in C# using Microsoft.Office.Interop.Excel.dll 11.0 . When tested on systems having Excel 2007 and Excel 2003 or only Excel 2007 it works fine but when tested on systems having only Excel 2003 , though the Applicationcalss object is created but some properties throws runtime exception for example
    'oExcel.CalculateBeforeSave' threw an exception of type 'System.Runtime.InteropServices.COMException
    it start giving run time exceptions.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,977

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    Are you sure you referenced interop 11 and not 12? 11 is the correct version for 2003, not for 2007.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    i m using interop 11

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,977

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    I couldn't say then. If anything you should be having issues with 2007, not 2003.

  5. #5
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    I have devloped an application in C# using Microsoft.Office.Interop.Excel.dll 11.0 . When tested on systems having Excel 2007 and Excel 2003 or only Excel 2007 it works fine but when tested on systems having only Excel 2003 , though the ApplicationCalss object is created but some of its properties throws runtime exception for example

    'oExcel.Chart threw an exception of type'
    System.Runtime.InteropServices.COMException (0x800A03EC):

    'oExcel.Column threw an exception of type' System.Runtime.InteropServices.COMException (0x800A03EC):

    While there are many other properties which are set without exceptions

    Due to which while opening Excel file through aplication is also throein errror

    Please help to find out why COM component for Excel is throwing exception on machine having Excel 2003

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,977

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    Could you post some of the actual code?

  7. #7
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    Workbook xlWorkBook = null;
    oExcel = new ApplicationClass();
    oExcel.ScreenUpdating = false;
    xlWorkBook = oExcel.Workbooks.Open(Template, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);

    no as soon as the application class object is created and whne i try to check the properties by some of the properties can be seen with System.Runtime.InteropServices.COMException (0x800A03EC):
    while others are properly set

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,977

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    Which properties are you checking? The Application ones? If so, which ones? Not all of them are available until a workbook is open. Also, what format workbook are you opening?

  9. #9
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    no even after workbook is open some of the properties are still throwing Error. Basically I m interesed in Chart property which is also thorwng exception.
    I m using Excel 2003 format
    I have also noted that on systems where excel 2007 though some of the properties throws exception but not Chart property hence i my application is runnig fine on those systems

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,977

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    The chart property of what?

  11. #11
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    Application object chart property

  12. #12
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,977

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    There isn't a Chart property of the Application object. Do you mean Charts or Activechart?

  13. #13
    Registered User
    Join Date
    08-14-2009
    Location
    india
    MS-Off Ver
    Excel 2003/ 2007
    Posts
    8

    Re: Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003

    I m sorry its Workbook object property.
    If you try to bring mouse over workbook object in debug mode once the workbook object s created and view property list after clicking + sign u'll see some properties with exceptions along with Charts Property

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1