ASP.NET Excel Problem

G

Guest

I'm using Microsoft Excel Object 11.0
(Microsoft.Office.Interop.Excel)
to open excel from my web application and set few cells values before
displaying it to users.
When I deployed the website to the server, the site won't run
because:
-
"Could not load file or assembly 'Microsoft.Office.Interop.Excel,
Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
or
one of its dependencies"

I think the error is because Excel is not installed on the web server
since the Microsoft.Office.Interop.Excel is looking for Excel.exe
file. I cannot install Excel on the web server because of the network
admin. How can fix this? Is there another way of loading excel other
than using that object? All users have Excel on their computers, so
running the website won't be a problem. I just need another excel
reference, if any; to make changes to the file before it is called by
users.
 
M

Mark Rae

How can fix this?

Sigh... here we go again.

Microsoft Office is not designed to be automated server-side i.e. by
ASP.NET. Microsoft won't support any application which does this:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

See the thread in the newsgroup entitled "Automation of Word from .net 2"
for further discussion about why you shouldn't even try to do this...

Is there another way of loading excel other than using that object?

There most certainly is!

1) If the Excel file is just plain text, create a CSV file.

2) Create an HTML file and give it an .xls extension

3) Use the Excel XML file format:
http://www.microsoft.com/downloads/...52-3547-420a-a412-00a2662442d9&displaylang=en

4) Use this:
http://www.aspose.com/Products/Aspose.Cells/Default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top