467,151 Members | 1,094 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,151 developers. It's quick & easy.

Opening an Existing Excel Document using ASP.NET

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?
Nov 19 '05 #1
  • viewed: 2896
Share:
4 Replies
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...

"Josh Behl" <Jo******@discussions.microsoft.com> glsD:61********************************* *@microsoft.com...
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?

Nov 19 '05 #2
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.

Nov 19 '05 #3
Actually, I got it working by setting the Excel Application DCOM to
interactive user.

Works like a charm!

"ma********@gmail.com" wrote:
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.

Nov 19 '05 #4
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
"Lau Lei Cheong" wrote:
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...

"Josh Behl" <Jo******@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:61*********************** ***********@microsoft.com...
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?


Feb 1 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jawahar Rajan | last post: by
2 posts views Thread by Brent Bortnick | last post: by
16 posts views Thread by Phil Stanton | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.