Results 1 to 4 of 4

Thread: Exception from HRESULT: 0x800A03EC

  1. #1
    Join Date
    Dec 2008
    Posts
    29

    Exception from HRESULT: 0x800A03EC

    Hello , I want to copy one worksheet into another spreadsheet from MS Excel When i Try Export to Excel 2000 Everything work fine, but if I Try To Export to Excel 2003,I Used a Macro Given by my Freind for this purpose, but when i used it , I get this Error "Exception from HRESULT: 0x800A03EC". Please Help me solve this Exception from HRESULT: 0x800A03EC Errror, Has anyone found a workaround for getting Excel 2003 to work? Thanks.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,139

    Re: Exception from HRESULT: 0x800A03EC

    Office adds a security option to deliberately lock out programmatic access to the VBA object model from any Automation client unless a user chooses to permit such access. This is a per user and per application setting, and denies access by default. This security option makes it more difficult for unauthorized programs to build "self-replicating" code that can harm end-user systems.

    Office 2003 and Office XP
    1. Open the Office 2003 or Office XP application in question. On the Tools menu, click Macro, and then click Security to open the Macro Security dialog box.
    2. On the Trusted Sources tab, click to select the Trust access to Visual Basic Project check box to turn on access.
    3. Click OK to apply the setting. You may need to restart the application for the code to run properly if you automate from a Component Object Model (COM) add-in or template.

  3. #3
    Join Date
    Apr 2008
    Posts
    4,088

    Re: Exception from HRESULT: 0x800A03EC

    Hello , If You Are Using Microsoft.Office.Interop.Excel.Application object in the C# applications program With the Excel.Range.value1 property then also if you are listing some datas on gridview and also exporting this datas to excel. On this export operation this application is bound to threw an exception Error like "HRESULT 0x800A03EC". the Most probable cause for these error line is that If a Excel cell includes equal char('='), excel probably conjectured this char as a excel formula and throw an exception. In conclusion, If you replace equal char('=') with another one,then your Problem Will be Solved Easily

  4. #4
    Join Date
    Sep 2005
    Posts
    1,306

    Re: Exception from HRESULT: 0x800A03EC

    I believe the exception is being thrown because your Macro code is creating a separate Excel.Application object to open each of the workbooks. Instead of trying to copy a worksheet from a workbook opened in one Excel.Application instance to a workbook opened in the other Excel.Application instance, you can use a single Excel.Application instance to open both of the workbooks.

Similar Threads

  1. Exception hresult: 0x800706ba occurred in RPC server
    By Thenral in forum Networking & Security
    Replies: 6
    Last Post: 05-06-2011, 10:22 AM
  2. Replies: 3
    Last Post: 10-08-2007, 02:36 PM
  3. Sound error HRESULT=0x88780078
    By Rob Dizzle in forum Windows XP Support
    Replies: 2
    Last Post: 17-05-2007, 05:02 PM
  4. Replies: 3
    Last Post: 18-04-2006, 06:11 PM

Tags for this Thread

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
  •  
Page generated in 1,714,150,524.13598 seconds with 17 queries