472,983 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

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
4 3144
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jawahar Rajan | last post by:
All, I am using the ASP code below to save some data from a SQL Server database via ADO as an Excel spreadsheet strReportName = Request.QueryString("ReportName") If len(strReportName) > 0 then...
2
by: Brent Bortnick | last post by:
Hello, Is it possible to send data from ASP and put it into a existing template? i don't want to create an excel document I only want to send one piece of information from ASP to the Exisiting...
4
by: Marco Aschwanden | last post by:
Hi I would like to 1. import an existing Excel-sheet (a template) 2. and add some data to it 3. and save it under a different name afterwards. To me it seems, that pyExcelerator does not...
0
by: sandeep ch | last post by:
hi , I am opening a excel sheet from perl but every time i run the program i get a pop up message saying that "This Workbook contains links to other sources" " - To update all linked information...
2
by: Mad Scientist Jr | last post by:
>From an asp.net web page I want the user to open the results of a SQL query in Excel, as automatically as possible (ie not having to loop through columns, rows, in code). For this,...
0
by: QuenteK25 | last post by:
Ok so I'm pretty novice at all of this VB stuff, but I have to do a personal project for a class I'm in and it's in VB. So there are a few things I want to do for it that we have never covered in...
1
by: gowthamkumar | last post by:
HII ... please give me a code to open a new excel sheet using VB so that i can also directly add some contents in the cells of the excel sheet in VB itself .. i ve use the existing excel sheet code...
0
by: okalpana | last post by:
Hi friends, trying to do a application program.. what is the code to open a existing word document or excel file in Visual Basic 5 with a command button. i.e Clicking th button should open a...
16
by: Phil Stanton | last post by:
I have a form with a button which is supposed to open an Excel file (With lots of Macros /VBA) in it. The Excel file gets it's data from the Access program Here is the code Private Sub...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.