By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,018 Members | 884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,018 IT Pros & Developers. It's quick & easy.

Opening an Existing Excel Document using ASP.NET

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.