I need to use excel automation in my ASP.NET web app. I am trying to import it in a .aspx file using the following code:
<%@ Import Namespace="Microsoft.Office.Interop.Excel" %>
however, when I open the page in the browser I get the error The type or namespace name 'Office' does not exist in the namespace 'Microsoft'
. So I assume I have to add some library to my project. I am using IIS 7.5 to create this web app, not Visual Studio. So is there a way to import external libraries into my ASP.NET project in IIS?
Asked
Active
Viewed 6,421 times
1

azrosen92
- 8,357
- 4
- 26
- 45
2 Answers
1
Right click on the Reference - .Net tab - Microsoft.Office.Interop.Excel
Excel 2010 use version 14 / Excel 2007 use version 12
click ok.

chenz101
- 85
- 11
0
You should be able to drop the Microsoft.Office.Interop.Excel.dll into the bin
directory. If that doesn't work try adding it to the <assemblies>
in your web.config
file.
-
Thank you! Where would I find the Microsoft.Office.Interop.Excel.dll file though? – azrosen92 Jun 06 '13 at 21:58