Similar Threads:
1.Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
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
2.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
3.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
4.Error 1911. Cannot register type library
Getting this error message when attempting to repair/reinstall Office
Standard XP or Office Student and Teacher 2003. This is only affecting Excel
not anything else with the programs. Microssoft tells me that I should go to
their PAY site to get help on this since they do not support this anymore.
Have looked at all their kb info's but they all refer to other programs,
and/or operating systems. Running Windows XP sp2.
Any thoughts or suggestions would be greatly appreciated
5.Registered Type Libraries
I am writing a class that returns a list of all registered type
libraries on a computer. Just by searching for the name of one of my
DLL's in the registry, i found where it stores all such information:
HKEY_CLASSES_ROOT\TypeLib\
I then looked in a few of the entries just to get a sense of how it
works. I understand all except the reason for the 2nd numbered
subdirectory.
An example is:
HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}
- 6.0 (visual basic for applications)
- 9
- win32 (C:\WINDOWS\System32\MSVBVM60.DLL)
- FLAGS (0)
- HELPDIR ()
In this example, i do not know what the "9" means. For most typelibs,
this value is "0", although i have also seen "409". What does this
number represent?
The primary reason of doing this is that I can then use the TLI classes
to extract other info from typelibs, including the expected name and
location of its help file. This is important because whenever i do F1
to get help in VB, i always get a blank help screen because the file is
never in the right place. so far, i have use this to correct at least
5 different typelibs, by searching my computer for a file with the same
name as what the typelib expects, and then copying it into the right
directory. this has helped a lot, because now i can actually get
contextual help on ADO and DAO methods, among other things.
Secondary reasons include the ability to dynamically extract interface
definitions from typelibs for easy implementation in VB and help in
transferring references across sourcesafe using our own sourcesafe
integration with the VBA IDE (which we had to build since the one that
came with office developer sucks).
Anyway, if anyone has any ideas about any other information i can get
from the registry or any other possible applications of such a class,
please let me know.
6. Register Access type library - Vista x64
7. Error : 1911. Setup cannot register type library
8. Getting Object Library Not Registered - Microsoft Visual Basic