Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to set the visibility of an Excel sheet to xlSheetVeryHidden. But I am getting an HRESULT: 0x800A03EC exception. The code is given below: Microsoft.Office.Interop.Excel.Application m_Excel; Microsoft.Office.Interop.Excel.Workbook m_WorkBook; Microsoft.Office.Interop.Excel.Worksheet m_worksheet; m_Excel = new Application(); m_Excel.Visible = false; m_Excel.DisplayAlerts = false; m_WorkBook = m_Excel.Workbooks.Add(XlWBATemplate.xlWBATWorkshee t); Worksheet sh = (Worksheet) m_WorkBook.Sheets[1]; sh.Visible = XlSheetVisibility.xlSheetVeryHidden; At the last line above I get the exception. Stack Trace is here. [COMException (0x800a03ec): Exception from HRESULT: 0x800A03EC.] Microsoft.Office.Interop.Excel._Worksheet.set_Visi ble(XlSheetVisibility RHS) +0 eMotion.DAM.Logic.Spreadsheet..ctor() in c:\inetpub\wwwroot\excelop\export.cs:34 ExcelOp.WebForm1.ExcelWrite_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\excelop\webform1.aspx.cs:53 System.Web.UI.WebControls.Button.OnClick(EventArgs e) System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) System.Web.UI.Page.ProcessRequestMain() Does anyone know the solution. I just need to hide the sheet. That's all. Thanks in Advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy a worksheet throws "Exception from HRESULT: 0x800A03EC." | Excel Programming | |||
Exception from HRESULT: 0x800A03EC | New Users to Excel | |||
Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel.WorkbookClass.get_VBProject() | Excel Programming | |||
HRESULT: 0x800A03EC setting DataSource for pivot tables. | Excel Programming | |||
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. | Excel Programming |