none
Solution for Excel Exception 0x800AC472 in c#.net RRS feed

  • Question

  • Hi,

       I'm working in VS 2005. I'm generation excel reports using c#.net by addint reference to excel 11.0 dll... while excel report generating, i opened some other excel file it threw an exception 0x800AC472. Why this happen?

    Can anyone help me?

    Thanks & Regards,

    Suresh.R


    Regards, Suresh R (MCA, TCE)
    Monday, April 13, 2009 4:46 AM

All replies

  • When you are filling , don't show the excel sheet.

    oMyExcel = new Excel.Application();
    oMyExcel.Visible = false;

    Look at this post too:
    "HRESULT 800ac472 from set operations in Excel"
    http://social.msdn.microsoft.com/forums/en-US/vsto/thread/9168f9f2-e5bc-4535-8d7d-4e374ab8ff09/

    HTH
    Monday, April 13, 2009 5:34 AM
  • Hi,

       when i filling, i didn't show the excel sheet also i set visible property false only.

       when i open some other different excel file, i can not access that file. whenever i clik tat file, it thows this excepiton..



    Regards, Suresh R (MCA, TCE)
    Monday, April 13, 2009 6:53 AM


  • Hi,

             I think you are calling excel sheet object every time, this give same error.


    1. You need to call the follwoing method once.

                           oMyExcel = new Excel.Application();

    2. Then you need to pass that object, where will you use that method.


              This give you proper output.


    Thank You.

    Note : Dont forget to check the 'Mark as answer' if this answer give you useful.
    Srikanth
    Monday, April 13, 2009 7:38 AM
  • Hi Suresh,

    Have you resolved your problem?

    Please consider providing your sample code if you still have problem. Thank you.



    Best regards,
    Guo
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, April 15, 2009 5:41 PM
  • Hi Guo, 


    This is my code..

                    excelApp = new Excel.ApplicationClass();
                    excelApp.DisplayAlerts = false;
                    excelWorkbook = excelApp.Workbooks.Add(XlSheetType.xlWorksheet);
                    excelSheets = excelWorkbook.Worksheets;

                    excelApp.Visible = false;
                    excelApp.UserControl = false;

                    SummaryReport = (Excel.Worksheet)excelWorkbook.ActiveSheet;
                    excelWorkbook.Windows[1].DisplayGridlines = false;


    I call this sheet to update data.. also i read SummaryReport sheet cell values for calculation... The problem is.. While genereate this excel file.. I could not use (access some other excel files (eg.abc.xls)).. Why this happening.. I got the exception 0x800AC472..

    Thanks in advance..


    Regards, Suresh R (MCA, TCE)
    Thursday, April 16, 2009 9:40 AM
  • Hi,

    I face the same problem as Suresh.

    And i use the same code as his.

    ,while generating the excel file  I cannot use or access any other excel file, If i try to access then i get the exception 0x800AC472.

    Can anyone tell why this is occurring?

     

     

     

    Thursday, April 29, 2010 8:59 PM
  • Hi,

       I am also facing the same problem. Did you get any solution to this. Any suggestion would be higly appreciated.

    Thanks

    Friday, October 8, 2010 7:21 AM
  • Hi,

       I am also facing the same problem. Did you get any solution to this. Any suggestion would be higly appreciated.

    Thanks

    Friday, October 8, 2010 7:21 AM
  • Hi,

       I am also facing the same problem. Did you get any solution to this. Any suggestion would be higly appreciated.

    Thanks


    try reading this:
    http://social.msdn.microsoft.com/forums/en-US/vsto/thread/9168f9f2-e5bc-4535-8d7d-4e374ab8ff09/
    It might help.
    Friday, October 8, 2010 8:02 AM