Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Excel
Hello,
I am Performing Reading operation on Excel Workbook (Xlsx)
I do not have Msoffice installed on my Machine,
While Creating Object of ExcelWorkBook it throws error Like
 
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
 
So My Question is that to Perform Programming on Excel is there a need to install MsOffice excel first ?
Posted 15-Sep-10 21:16pm
Comments
Aarti2010 at 16-Sep-10 3:29am
   
yes first you have to install msOffice before that he will not understand what he have to do.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Yes, you have to install MSOffice.
You can also use OLEDB Provider for this.
 
This is code for u -
string connectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1;""", fileName);
string query = String.Format("select * from [{0}$]", "Sheet1");
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, connectionString);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
return ds;
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

MS Office does not just give you Excel, Word etc, but also the framework that allows data manipulation, import export, VBA etc.
 
It is necessary for it to be installed in order to have the functionality available for iis etc.
  Permalink  
Comments
Monjurul Habib at 28-Apr-11 18:45pm
   
nice recommendation.my 5.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Yes Microsoft Office needs to be installed in your machine. As for C# programming we needed to add a reference to excel and this visual studio can get only when components of Microsoft office is registered. While installing office all the components gets registered and we get reference of that registered component in our program.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 400
1 Gihan Liyanage 238
2 Sergey Alexandrovich Kryukov 150
3 ChauhanAjay 120
4 syed shanu 110
0 Sergey Alexandrovich Kryukov 9,056
1 OriginalGriff 7,981
2 CPallini 2,613
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 1 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100