Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 638591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:44:57+00:00 2026-05-13T20:44:57+00:00

I have a .NET C# windows app that I need to read some excel

  • 0

I have a .NET C# windows app that I need to read some excel data into. I have started by writing some unit tests .. one of the first just trys to instantiate a Workbook, and it is throwing this error …

System.Runtime.InteropServices.COMException: System.Runtime.InteropService.COMException: Retrieving the COM class factory for component with CLSID {GUID} failed due to the following error: 80040154 Class not registered {Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

This piece of the app is really simple, the one method,
public Workbook RetrieveWorkbook()
{
return new Workbook();
}

and one unit test that calls this function.

Code is using Microsoft.Office.Interop.Excel.

I went into the dcom config utility and verified that access seem to be correct. What am I missing? Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:44:57+00:00Added an answer on May 13, 2026 at 8:44 pm

    The MSDN Library article for the Workbook class constructor is quite explicit:

    Microsoft.Office.Tools.Excel.Workbook
    host items cannot be created
    programmatically.

    Use the Application.Workbooks.Add() method, sample code is here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple .NET 2.0 windows form app that runs off of a
We have an MSI installer for a .Net WinForms app for Windows XP that
I have several .NET Windows Forms applications that I'm preparing to convert into a
I have a .NET 2.0 windows forms app, which makes heavy use of the
I have a .Net Compact app running on Windows Mobile, and I want to
I have a pretty basic windows form app in .Net. All the code is
I have a .NET Framework 2.0 app and would like to use the Windows
This is a strange one... In a windows forms app (VB.NET/VS 2005) I have
I have a Windows Forms (.Net 2.0) app and I have a request to
I have a VB.NET Windows Forms project that at one point paints text directly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.