Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheetwith Excel Interface Error.
There is one UI instance of Excel 2007 up with an error message and
when I try to instantiate the worksheet component through VB.Net I get this error: It seems that the UI instance is blocking access to the worksheet component. VB.Net Error: "Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001." Excel UI Error: The file you are trying to open test.xls is in a different format than specified by the file extension. VB.Net Code: Dim MainWorkSheet As New Microsoft.Office.Interop.Excel.Worksheet |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheetwith Excel Interface Error.
On Aug 28, 11:19*pm, "Michael G." wrote:
There is one UI instance of Excel 2007 up with an error message and when I try to instantiate the worksheet component through VB.Net I get this error: *It seems that the UI instance is blocking access to the worksheet component. VB.Net Error: "Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001." Excel UI Error: The file you are trying to open test.xls is in a different format than specified by the file extension. VB.Net Code: *Dim MainWorkSheet As New Microsoft.Office.Interop.Excel.Worksheet What library did you referance? Excel 11.0 or 12.0? If you have Excel 2007 then you have 12.0 library which can't read xls files, just xlsx files. 11.0 reads xls files. So if you want to read that file get yourself Excel 2003. Other way to solve this is to use GemBox.Spreadsheet component. It is not dependable on any Excel version so you won't have problems like this. Take a look: http://www.gemboxsoftware.com/GBSpreadsheet.htm |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheet with Excel Interface Error.
then you have 12.0 library which can't read xls files, just xlsx files. What? 12 can read any Excel format going back to at least 4 if not earlier. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Sat, 29 Aug 2009 08:30:04 -0700 (PDT), filip wrote: On Aug 28, 11:19*pm, "Michael G." wrote: There is one UI instance of Excel 2007 up with an error message and when I try to instantiate the worksheet component through VB.Net I get this error: *It seems that the UI instance is blocking access to the worksheet component. VB.Net Error: "Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001." Excel UI Error: The file you are trying to open test.xls is in a different format than specified by the file extension. VB.Net Code: *Dim MainWorkSheet As New Microsoft.Office.Interop.Excel.Worksheet What library did you referance? Excel 11.0 or 12.0? If you have Excel 2007 then you have 12.0 library which can't read xls files, just xlsx files. 11.0 reads xls files. So if you want to read that file get yourself Excel 2003. Other way to solve this is to use GemBox.Spreadsheet component. It is not dependable on any Excel version so you won't have problems like this. Take a look: http://www.gemboxsoftware.com/GBSpreadsheet.htm |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheet with Excel Interface Error.
As Chip has pointed out this is not an Excel version/library issue. This
error message will show even if manually user attempts to open (say) an xlsx that has been renamed xls. Very often in the last few weeks I've noticed Gembox being promoted as the solution to some problem even though it has nothing to do with the actual issue of the thread, yet alone a solution. I'm sure you mentioned the library reference in good faith, but can I ask if you are in some way connected with Gembox. Regards, Peter T "filip" wrote in message news:97f08ab0-0876-48b3-8fa4- Excel UI Error: The file you are trying to open test.xls is in a different format than specified by the file extension. What library did you referance? Excel 11.0 or 12.0? If you have Excel 2007 then you have 12.0 library which can't read xls files, just xlsx files. 11.0 reads xls files. So if you want to read that file get yourself Excel 2003. Other way to solve this is to use GemBox.Spreadsheet component. It is not dependable on any Excel version so you won't have problems like this. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheet with Excel Interface Error.
While an Excel dialog is displayed normally you cannot automate Excel. This
can pose a dilemma if you are not sure what the dialog is, why it is displaying and is it waiting for the user to handle (whilst gone for a coffee) or triggered due to some action of your own code. Assuming at least you have an object reference to the application you can try something like this (either in advance or after catching the error) If xlApp.Ready = False then some dialog showing or user in edit mode loop with a timer until .Ready = true or abort or perhaps even SendKeys (or API equivalent) an Esc to dismiss the known dialog Regards, Peter T "Michael G." wrote in message ... There is one UI instance of Excel 2007 up with an error message and when I try to instantiate the worksheet component through VB.Net I get this error: It seems that the UI instance is blocking access to the worksheet component. VB.Net Error: "Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001." Excel UI Error: The file you are trying to open test.xls is in a different format than specified by the file extension. VB.Net Code: Dim MainWorkSheet As New Microsoft.Office.Interop.Excel.Worksheet |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot Get Instance of Com component Microsoft.Office.Interop.Excel.Worksheet with Excel Interface Error.
PS
I should have clarified it's not possible to check the .Ready state with all dialogs and situations, though in a quick check it should work with your particular error message. Peter T "Peter T" <peter_t@discussions wrote in message ... While an Excel dialog is displayed normally you cannot automate Excel. This can pose a dilemma if you are not sure what the dialog is, why it is displaying and is it waiting for the user to handle (whilst gone for a coffee) or triggered due to some action of your own code. Assuming at least you have an object reference to the application you can try something like this (either in advance or after catching the error) If xlApp.Ready = False then some dialog showing or user in edit mode loop with a timer until .Ready = true or abort or perhaps even SendKeys (or API equivalent) an Esc to dismiss the known dialog Regards, Peter T "Michael G." wrote in message ... There is one UI instance of Excel 2007 up with an error message and when I try to instantiate the worksheet component through VB.Net I get this error: It seems that the UI instance is blocking access to the worksheet component. VB.Net Error: "Creating an instance of the COM component with CLSID {00020820-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80010001." Excel UI Error: The file you are trying to open test.xls is in a different format than specified by the file extension. VB.Net Code: Dim MainWorkSheet As New Microsoft.Office.Interop.Excel.Worksheet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error in excel com: Microsoft.Office.Interop.Excel Exception from HRESULT: 0x800A03EC | Excel Programming | |||
Microsoft.Office.Interop.Excel.Application | Excel Programming | |||
Microsoft.Office.Interop.Excel Texttocolumns C# | Excel Programming | |||
Where can I find Microsoft.Office.Interop.Excel.dll? | Excel Programming | |||
Microsoft.Office.Interop.Excel SaveAs error when clicking no or ca | Excel Programming |