.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

** Microsoft.Office.Interop.Excel.dll - Do I need Excel installed?? **

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :.NET Framework
Hi,I have a VB.Net app which creates an Excel report.  This is all working fine on my development boxwhich turns out to have MS Office 2003 installed.  The app works fine.  I added a reference toMicrosoft Excel 11.0 Object Library under the COM tab when I did the "Add Reference".  I also copiedthe Interop.Excel.dll to my BIN folder.The server that I need to deploy my app to does not have MS Office or Excel installed.  I ran the appanyway just to see if it would worked.  Of course, it failed with this error:Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} failed due to the following error: 80040154.Do I need to have Excel installed on the target machine?  I took a copy of "Microsoft.Office.Interop.Excel.dll"from the GAC on the DEV box and installed on the GAC on the target machine.  Tried the app again and stillfailed with the same error.  I really don't want to install Excel if I don't have to.  Can someone please providesome help on this?Thank you in advance!

View Complete Post

More Related Resource Links

Can't find Microsoft.Office.Interop.Excel.dll



I am trying to use this namespace and downloaded the O2003pia.exe from http://support.microsoft.com/kb/897646.


I ran the msi and see the Interop files in the GAC but when I try to 'Add a Reference' in VS2005, I do not see any of the Interop namespaces.


I already had Office 2003 installed before I ran the above msi.


What else am I doing wrong. Why aren't these included with VS2005 in the first place..............


Please help,



ASP.NET Excel Microsoft.Office.Interop.Excel.ApplicationClass



My server is windows 2008 R2. Everything is running well except the following.

Whenever I tried to export to excel using:

Microsoft.Office.Interop.Excel.ApplicationClass app = new Microsoft.Office.Interop.Excel.ApplicationClass();

It shows exception:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

I searched on google, almost every suggestion told me to find Microsoft Excel Application in DomConfig. But I found no Microsoft Excel in DomConfig. Please note, I have Excel 2003 & 2007 on that server.

Please help me, its really urgent.

Microsoft.Office.Interop.Excel NumberFormmatting Help


Hi Everyone. I wasn't sure which forum to put this under, so please move if necessary.


I have an app that exports a data table to excel. This works, however, i have a column with currency that i can't get formatted properly.


IE: Right now it prints 24450.00 or 24000 if a whole number with no decimal places.


I have tried a lot of things, but this is what i have right now for my range and formatting. Below is a copy of the method. Please let me know where i am going wrong, because with this range and formatting, SOME of the numbers are showing up #######.


Below is my formatting code. What am i missing? It seems like it formats some based on the "$#,##0.00", but it doesn't work for them all.

How do i set everything to "Currency" like in the excel options? I have tried range.NumberFormat = "Currency" but that is invalid. Any help is appreciated.

 Microsoft.Office.Interop.Excel._Application excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
      Microsoft.Office.Interop.Excel.Workbook wb = (Microsoft.Office.Interop.Excel.Workbook)excel.Workbooks.Add(System.Reflection.Missing.Value);
      Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.In

Microsoft.Office.Interop.Excel on Server


Good day,

I got the srcipt working on my Local PC.
But when importing on to server, i get the error.

"Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

I copied the files & registered to all locations i have on my local PC.

But the the server does not have the  Visual Studio .NET Command Prompt - not sure if it is needed as I use the register.bat


Microsoft.Office.Interop.Excel, Version= issue


Hello Friends,

I just got a new computer. Running VS2008 professional with MS Office 2010 on a Win 7 64-bit machine... 

I am using the Excel in my Web Site (NOTE: It is not a Web App so I do not have a csproj file in there) 

I am getting this error on my Windows 2003 Web servers (I have 2 of them): 

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I am assuming this has something to do with MS Office 2010 (office 2003 is installed on the servers) 

Microsoft.Office.Interop.Excel dll files from my directory and picked the version 11. This error message still comes up. 

Please HELP!!!! Thanks

issues with Microsoft.Office.Interop.Excel in asp.net throwing Exception from HRESULT: 0x800A03EC


i m using Microsoft.Office.Interop.Excel in asp.net for Excel file as anEmail attachment .

i get the data and write to Excel but when i try to save like:

oWB.SaveAs(strCurrentDir +strFile, Microsoft.Office.Interop.Excel.


XlFileFormat.xlWorkbookNormal, null,

could not load file or assembly'Microsoft.office.interop.excel


could not load file or assembly'Microsoft.office.interop.excel, version=  , culture=neutral, public keytoken=71e9bce111e9429c' or one of its dependencies

i am getting this error when i am installing setup of my project in other machine.


Microsoft Office Excel cannot open or save any more documents because there is not enough available


hi all,

     i am new to asp.net programming i am trying to create an ms excel file with charts drawn in it,

i wrote the complete code for it but the it is saying

Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. 

i have set the permissions to my complete disk space and all user accounts, and i tried with anti-virus disabling also it didnt work please try to help me out and my code is :

Imports System.Data.OleDb
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Tools.Excel
Imports System

Read Excel sheet by Sheet Name using office interop

Hi,I am using office interop to read Excel sheet.I want to read the contents of the sheet  using the name of the sheet.For example I want to read the contents of the sheet- "ABC" (if ABC exists).Thanks

Excel does not open in the browser even after office web is installed and integrated with sharepoint


guys, i have installed and configured office web apps with sharepoint 2010 after which i

a.  i created SA instances for excel , word viewing and powerpoint,

b. activated office web feature and deactivated "opening in the client application" feature

now word opens up fine in the browser but excel still opens in the client application, any suggestions?




Microsoft Office Excel cannot access the file.There are several possible reasons: . The file name or

Hi all,
I am workin on Arc IMS web application project where I will be uploading an excel file containing data say city,addresszip(column headers in excel file)..etc..and load necessary column data in listboxes..and finally save the data to an excel file..when I run though Studio I dont get error..when I run through browser..I got errors ..I even modified DCOMCNFG...But..I get the below error..
Microsoft Office Excel cannot access the file 'E:\vijay\ArcIms\Excelsheets'. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.
Here goes my code..
Imports Excel
Imports System.Data.OleDb
Imports System.Data
Partial Class _Default
    Inherits System.Web.UI.Page
    Dim connection As New System.Data.OleDb.OleDbConnection
    Dim command As New System.Data.OleDb.OleDbCommand
    Dim dr As System.Data.OleDb.OleDbDataReader
    Dim cmd1 As New System.Data.Ol

Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot\ProjectWebSite\Files\ROUTINE_MCA.


Hello everybody.

I am in a critical situation. I first tried to make a project (file->new->project) using visual studio, where I displayed the content of a excel file by GridView. I was successful then, but when I attach it to my website located in inetpub I am getting this error :

Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot\ProjectWebSite\Files\ROUTINE_MCA.xlsx'. There are several possible reasons:

. The file name or path does not exist.
. The file is being used by another program.
. The workbook you are trying to save has the same name as a currently open workbook.

At first I faced some COM related problem and found solution in Google, but this particular problem is not solving. Is there any way to access Excel document in asp.net website?

In my application there is a facility of uploading excel document to the server and then display its content. But I have failed to do this display operation, is there any turn around way, like store the excel document as dataset and then access it as required.

Please help. I am in great trouble. Thanks in advance.

Microsoft Office Excel cannot access the file


Hi All,

I'm having difficulty opening microsoft office files  in this case Excel on a Sharepoint 2007 site when using IE 6.  Here are the errors I get: 

Excel:  Microsoft Office Excel cannot access the file
'https://<var>server_name</var> SPSsite/documents/<var>file_name</var> .xls'. There are several possible reasons:
The file name or path does not exist.
The file being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.

Here are some additional details:

OS = Vista
IE = Version 6

Please help me :)


Excel Interop Save as



I want to Save excel workbook using Excel interop in 97-2003 format. Currently I have Office 2007 installed on my machine.

below is the code I am using.

_book.SaveAs("New.xls", Excel.XlFileFormat.xlWorkbookDefault, Missing.Value, Missing.Value, false, false, Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);

The solution is little urgent.


System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot open or save any mo


Hello good people, 

I have this beast as an error. Did my research and found some posts here as well but did not do any good for me. 

Here is what I did. I had an error regarding issue rights with COM objects so I gave access rights under component services for Microsoft Excel application now I am getting this error. 

Here is some information regarding this

1. Gave rights to ASPNET and network service to my web app directory to try to fix this error. 

2. The exact same process works on my Windows 2003 server and my Windows 7 development machine. I am trying to get this going on a different windows 2003 machine that is outside of our domain.

3. Developing on windows 7 64 bit with office 2010 installed. Also excel 2010 is installed on my Web server

4. Here is the code that is causing the error: The last line is causing the error.:

            MyXl = new Microsoft.Office.Interop.Excel.Application();
            MyXl.Visible = false;
            MyWb = (Microsoft.Office.Interop.Excel._Workbook)(MyXl.Workbooks.Add(Missing.Value));
            int test = 0; 
            MySheet = (Microsoft.Office.Interop.Excel._Worksheet)MyXl.ActiveSheet;
            if (reader.HasRows)
                int InRow = 2; 
                for (int i = 0; i < Nu

In sharepoint excel working fine in office 2007 but not in office 2010


Hi All,

we receive error  while trying to create excel sheet using the template we have uploaded on the SharePoint 2007.


This occurs on a machine that has Office 2010 installed. Earlier the machine had Office 2007 and everything was working fine.


Can you let me know why is problem is coming and how to resolve this.



Sanjeev Tiwari


Can I search Office Documents (Excel, Word etc) in WSS 3.0 without having to install MS Office?



Does WSS 3.0 come with the filters for searching MS Office Documents or do you have to have MS Office installed on WSS 3.0 Server?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend