Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have got the above error when i publish my web app on the server. Can anyone tell me the solution? Below is the stack trace.

Stack Trace
VB
[FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.]
   WebApplication1.Admin1.Page_Load(Object sender, EventArgs e) in C:\Users\Pei Wen\Desktop\SHS\fyp-final.23\WebApplication1\WebApplication1\AdminStudentMGR.aspx.vb:273
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Thanks in advance.
Posted
Updated 27-Apr-11 23:13pm
v3

Your webserver obviously does not have Microsoft Office installed. To use the Interop Assemblies for Office, MS Office needs to be installed on the machine running the application.

Hope this helps
 
Share this answer
 
Comments
lowpw 28-Apr-11 4:12am    
Microsoft office 2003 is installed inside.
Have you added the reference Microsoft.Office.Interop.Excel
 
Share this answer
 
Comments
lowpw 28-Apr-11 4:32am    
no. i added Microsoft Excel 12.0 Object Libary
You have to run
C++
AccessDatabaseEngine.exe

for version 12.0 in your OS

download exe from net
 
Share this answer
 
v2
Comments
lowpw 28-Apr-11 5:22am    
it's still not working. :(
Ashishmau 28-Apr-11 5:39am    
check your excel path IS correct or not
lowpw 28-Apr-11 5:41am    
what do you mean? it's working when i run in using visual studio.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900