Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Microsoft OFFICE

    Next

  • 1. Can OWC connect to AS 2005 Cube?
    Hi Does pivot table of "Office 2003 add-in Web and Components" support connecting to AS 2005 Cube? When connecting to AS 2005 Cube responses the error message: Cna't connect to Server 'Localhost'. Server is busy or inactive. My AS server is working. So, want to make sure the Office 2003 add-in webpart can't connect to AS 2005 Cube! Thanks! Angi
  • 2. Create a chart object in LotusScript ?
    hello I'd like to create an object in LotusScript to build dynamic Charts in a web page, I don't find the way to create this object in LotusScript... Any ideas ? Thanks a lot
  • 3. Office web component for word document
    Is there a office web component for web base word document edit? all the standard edit function and save function plus digital sign and track changes function. Thanks advance.
  • 4. Export form PivotTable, then Import into PivotTable
    Hi there, I'm connecting PivotTable to OLAP Cube on the server: <script language="VBScript"> OLAPProvider = "Provider=................" OLAPCube = "Sales" Function start() PivotTable.ConnectionString = OLAPProvider PivotTable.DataMember = OLAPCube End Function </script> then i'm building "my PivotTable" and here is a question: how to export it to xml file whitch can be imported once again? when i'll export it to Excel, it's building PivotTablexxxx.HTM file in Temp, then Excel is reading this file, but how to import it into blank PivotTable? When i'm trying to import this file there is an error: Error opening data file "file://c:\myfile.htm" to import this file i'm using this script: <script language="VBScript"> providerPivotTable = "provider=mspersist" strdirname = "c:\myfile.htm" Function start() PivotTable.ConnectionString = providerPivotTable PivotTable.CommandText = strdirname End Function </script> What's wrong with this? Any ideas? I have tried also to save this file from excel in .csv and .xml format, but it's not working anyway. Please help, Richard

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Postby kandala.sv » Thu, 24 Apr 2008 20:38:16 GMT

Hi,

I am working with a conversion application from VB 6.0 to VB.NET 2005.
I used Visual Studio 2005 for conversion of this VB 6.0 code. It's
sussfully converted And Working fine in some devlopment systems.  But
in few systems (like, my development PC) an AxComCtlLib.dll is missing
in Reference of .net Solutions automatically. I try to add
AxComCtlLib.dll from bin to Reference of .net Solutions. Now project
is Sucessfully compiling in my Development PC also and When I try to
run the application I am getting below error in the
InitializeComponent().

Class not registered (Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG))

Can anybody suggest me with the solution for this. Its very urgent for
me. Please try to help me asap.
Thanks in advance.
Sreenivasulu.k


Re: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Postby Alvin Bruney [ASP.NET MVP] » Mon, 28 Apr 2008 06:12:15 GMT

You need to register the underlying COM object that AxComTtlLib. Copy it 
from another computer and run regsvr32 on the dll

-- 

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
------------------------------------------------------- 









Similar Threads:

1.error code 0x80040154 class not registered

We get this "Clip art cannot complete the operation"message and error code 
0x80040154 class not registered and that is all we can get out of our Insert 
Picture. Patiently we have tried EVERYTHING MS has to offer to NO avail!! Our 
Office 2000 Pro worked flawlessly and we upgraded to this, YAK!!!

2.Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_

My current code ran in VS2003 on a XPpro machine. I transferred it to a Vista 
machine and had to purchase VS2005 . I made the changes and the code ran. I 
made additions over several weks and the code still ran . I did not run the 
code a gain for about a month and then the code would not run on the Vista 
machine so I installed VS2005 on an XPpro PC and the same then code compiiles 
and runs fine. 
 

Both PCs have Ofiice 2003 Pro on them and no other versions of Excel or 
office.

 

It as if one of  the MS regular Vista updates made a change causing the code 
not to compile.

 

My code is in Visaul Basic

 

These are the first lines of the code

 

Imports System.IO

Imports System.IO.StreamReader

Imports System

Imports System.Threading

Imports System.text.regularexpressions

Imports System.Text

Imports System.Globalization

Imports System.Collections

Imports Microsoft.Office.interop.excel

Imports Excel = Microsoft.Office.Interop.Excel

Imports System.Reflection

Imports System.Runtime.InteropServices

 

The lines following this are Windows Form Designer Generated code (about 
2000 of them ) Total program is about 9000 lines

 

Dim ExcelScheduler As New Excel.Application

Dim ExcelWB As Excel.Workbook = 
ExcelScheduler.Workbooks.Open("C:\ExactaRecords\Scheduler.xls")

Dim ScheduleSheet1 As Excel.Worksheet = ExcelWB.Sheets(1)

Dim ScheduleSheet2 As Excel.Worksheet = ExcelWB.Sheets(2)

Dim ScheduleSheet3 As Excel.Worksheet = ExcelWB.Sheets(3)

 

ScheduleSheet1 = ExcelWB.Worksheets(1)

ScheduleSheet2 = ExcelWB.Worksheets(2)

ScheduleSheet3 = ExcelWB.Worksheets(3)

 

This is the error message:

 

System.InvalidCastException occurred
  Message="Unable to cast COM object of type 
'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 
'Microsoft.Office.Interop.Excel._Application'. This operation failed because 
the QueryInterface call on the COM component for the interface with IID 
'{000208D5-0000-0000-C000-000000000046}' failed due to the following error: 
Library not registered. (Exception from HRESULT: 0x8002801D 
(TYPE_E_LIBNOTREGISTERED))."
  Source="Microsoft.Office.Interop.Excel"
  StackTrace:
       at Microsoft.Office.Interop.Excel.ApplicationClass.get_Workbooks()
       at ShowTimeScheduler.ShowTimeDirector..ctor() in 
C:\ShowTimeScheduler\Backup\ShowTimeDirector.vb:line 2222


Error occurs at the line :

 

Dim ExcelWB As Excel.Workbook = 
ExcelScheduler.Workbooks.Open("C:\ExactaRecords\Scheduler.xls")

 

 

Does any one have any ideas how to fix this problem?

Thanks




3.Class not registered: 0x80040154

Hi everybody,

An OWC Spreadsheet is placed on a windows form in my C# project. This
application was written on a XP 32bit machine and is working smoothly
meanwhile. Thanks to a great support in this board!

Now I had the chance to install XP 64 on one of my machines and was
curious whether my app would work on that as well. After installing
the OWC from the MS Homepage, the build of the application went fine.
When I started it in the IDE it highlighted the line:

((System.ComponentModel.ISupportInitialize)
(this.axSpreadsheet1)).EndInit();

the message is.

  Message="Class not registered (Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG))"
  Source="System.Windows.Forms"
  ErrorCode=-2147221164
  StackTrace:
       at
System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid,
Object punkOuter, Int32 context, Guid& iid)
       at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)

I browsed the internet without any luck. There was a little bit about
SQL Server, but that was about it. If you have any idea it would be
great if you can share it with me.

Cheers

Stocki

4.Interface not registered (Exception from HRESULT: 0x80040155)

I am working in MS Office Accounting Express 2007 and MS Office Word 2003 and 
trying to either send a quote as an email or save as a Word document. This is 
when I am getting this error.

Is there a compatability issue with the Accounting software and this version 
of Word?

How can I get this fixed?
-- 
Eddi Rae

5.Exception from HRESULT: 0x800A03EC - COM Exception Unhandled

Hi,

I am working on exporting data from a dataset to excel.  When I used save 
file dialog to save the file in a desired path I came across this Error.

Please find below the code I have used

using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace EXPORT_DATASET_EXCEL_II
{
	static class ExportingCellByCellMethod
	{

        public static void ExportToExcel(DataSet dataSet, string outputPath)
       // public static void ExportToExcel(DataSet dataSet)
        {

            // Create the Excel Application object
            ApplicationClass excelApp = new ApplicationClass();
            //excelApp.Interactive = false;
            // Create a new Excel Workbook
            Workbook excelWorkbook = excelApp.Workbooks.Add(Type.Missing);

            int sheetIndex = 0;

            // Copy each DataTable as a new Sheet
            foreach (System.Data.DataTable dt in dataSet.Tables)
            {

                // Create a new Sheet
                Worksheet excelSheet = (Worksheet)excelWorkbook.Sheets.Add(
                    excelWorkbook.Sheets.get_Item(++sheetIndex),
                    Type.Missing, 1, XlSheetType.xlWorksheet);
                
                excelSheet.Name = dt.TableName;               
                
               
                // Copy the column names (cell-by-cell)
                for (int col = 0; col < dt.Columns.Count; col++)
                {
                    excelSheet.Cells[1, col + 1] = dt.Columns[col].ColumnName;
                }

                                                              
                
                    // Copy the values (cell-by-cell)
                    for (int col = 0; col < dt.Columns.Count; col++)
                    {
                        for (int row = 0; row < dt.Rows.Count; row++)
                        {
                            excelSheet.Cells[row + 2, col + 1] = 
dt.Rows[row].ItemArray[col];
                            ((Range)excelSheet.Rows[1, 
Type.Missing]).AutoFit();
                        }                        
                        
                        ((Range)excelSheet.Columns[1, 
Type.Missing]).AutoFit();
                        ((Range)excelSheet.Columns[2, 
Type.Missing]).AutoFit();
                        ((Range)excelSheet.Columns[3, 
Type.Missing]).AutoFit();

                    }

                }
            

                // Save and Close the Workbook
            
                excelWorkbook.SaveAs(outputPath, 
XlFileFormat.xlWorkbookNormal, Type.Missing,
                    Type.Missing, Type.Missing, Type.Missing, 
XlSaveAsAccessMode.xlExclusive,
                    Type.Missing, Type.Missing, Type.Missing, Type.Missing, 
Type.Missing);
                excelWorkbook.Close(true, Type.Missing, Type.Missing);  

                
                excelWorkbook = null;
            
                // Release the Application object
                excelApp.Quit();
                excelApp = null;

                // Collect the unreferenced objects
                GC.Collect();
                GC.WaitForPendingFinalizers();
                           
            }          
               
        }

	}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Configuration;

namespace EXPORT_DATASET_EXCEL_II
{
    public partial class Form1 : Form
    {
        System.Data.OleDb.OleDbConnection conn;
        OleDbDataAdapter DA;
        string S;
        DataSet source;        

        public Form1()
        {
            InitializeComponent();
            conn = new System.Data.OleDb.OleDbConnection();
            conn.ConnectionString = 
ConfigurationManager.ConnectionStrings["MSAccess"].ToString();
        }

private DataSet getDemoDataSet()
        {
            S = "Select Emp_ID as [ID], Emp_Name as NAME,Reason as REASON, 
Submitted_Date as [SUBMITTED DATE] from LEAVEMASTER_TABLE";
            source = new DataSet();
            DA = new OleDbDataAdapter(S, conn);
            DA.Fill(source);
            source.Tables[0].TableName = "sample";
            return source;
        }

private void button2_Click(object sender, EventArgs e)
        {
            DataSet demoDataSet = this.getDemoDataSet();
            string savepath;
            saveFileDialog1 = new SaveFileDialog();
            savepath = saveFileDialog1.FileName + ".xls";
            saveFileDialog1.Filter = "xls files (*.xls)|*.xls";
            
            if (saveFileDialog1.ShowDialog() == 
System.Windows.Forms.DialogResult.OK
                && saveFileDialog1.FileName.Length > 0)
            {
                ExportingCellByCellMethod.ExportToExcel(demoDataSet, 
savepath);           
                               
            }
            

            MessageBox.Show("Data Exported successfully");                   
              

        }
    }
}


Can anyone help me out in solving this? Replies are highly appreciated. TIA.
-- 
Regards,
Karthik

6. Class Not Registered Error In Vis Studio IDE

7. class not registered

8. Class Not Registered Error



Return to Microsoft OFFICE

 

Who is online

Users browsing this forum: No registered users and 80 guest