Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exception from HRESULT: 0x800A03EC While opening Workbook
Hi,
I want to get the Name of the Sheets in a Excel File. Nothing else. I am getting Exception from HRESULT: 0x800A03EC when I go for Workbooks.Open in vb.net application. I tried it in C#.net too :-( Here is my Code, plz help out. I have tried lot many things on this and almost searched whole Google... '-------------------------------------------------------- Dim thisThread As System.Threading.Thread = System.Threading.Thread.CurrentThread Dim originalCulture As System.Globalization.CultureInfo = thisThread.CurrentCulture Try thisThread.CurrentCulture = New System.Globalization.CultureInfo("en-US") Dim ExcelApp As Excel.Application Dim ExcelWB As Excel.Workbook Dim objMissing As Object = System.Reflection.Missing.Value ExcelApp = New Excel.Application 'COM object with CLSID {00020819-0000-0000-C000-000000000046} is either not valid or not registered. ExcelApp.Workbooks.Open("C:\InputFiles\payments.xl s", objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing, objMissing) 'Exception from HRESULT: 0x800A03EC. Dim ExcelWs As Excel.Worksheet = DirectCast(ExcelWB.Sheets.Item(1), Excel.Worksheet) MsgBox(ExcelWs.Name) Finally thisThread.CurrentCulture = originalCulture End Try '-------------------------------------------------------- -- Shreyash Singh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HRESULT: 0x800A03EC exception when trying to hide a sheet. | Excel Programming | |||
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 | |||
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. | Excel Programming |