Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HRESULT: 0x800A03EC exception when trying to hide a sheet. VVVVVK Excel Programming 1 August 25th 06 11:59 AM
Copy a worksheet throws "Exception from HRESULT: 0x800A03EC." i3tech Excel Programming 4 August 15th 06 01:37 PM
Exception from HRESULT: 0x800A03EC nano2k New Users to Excel 0 July 21st 06 12:15 PM
Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel.WorkbookClass.get_VBProject() [email protected] Excel Programming 0 April 11th 06 04:40 PM
Chart.Export throws COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC. Steven Excel Programming 1 November 5th 03 06:59 PM


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"