Opening an Existing Excel Document using ASP.NET

G

Guest

When I try to programmatically open an existing Excel document using a custom
windows form, it works perfectly. I instanciate a new instance of the
Excel.ApplicationClass and then set the Visible property to 'true'...then I
open the workbook in question via my code.....


However, when I try this using ASP.NET. It does not work. I've messed
around and gave full access and control to my ASPNET user to practically
every darn folder on my machine...as you can see I am getting a bit crazy
trying to figure this out.....and that still does not seem to work.

What am I doing wrong?
 
L

Lau Lei Cheong

Remember to always closing your workbook before the page renders, or your
workbook will remain open when your page reloads, and Excel will force it in
read-only mode because someone else(even if the same person) is still
opening it.

In general, automating Office Application in ASP.NET is not a good idea, and
I'm not certain whether it violates the Eula or not...
 
M

martinkl11

I believe this may be a dcom permissions error. You may be able to
check this by looking for a windows error log message about DCOM. Try
running dcomcnfg. Drill down to DCOM config. Add ASPNET user to the
security of the exel member of this list. I haven't actually done this
myself but I have seen that in quite a few places while researching a
similar problem.
 
G

Guest

Actually, I got it working by setting the Excel Application DCOM to
interactive user.

Works like a charm!
 
G

Guest

I had the same problem. I wrote code to upload an Excel file then open the
file to retrieve data. There are some images in the worksheet. Any
suggestions as how you will approach it.

Thanks,

Richard Lo
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top