Using excel in a webservice

B

Bar

Hi,

I have an excel worksheet with a lot of calculations which i would like to
incapsulate in a webservice. The scenario is that the webservice opens the
worksheet (by opening excel) fills in an couple of fields, lets excel
compute some values and send these values to the callee of the webservice.
Can i get this working? Is there a possibility not to envoke an excel
application object for each call but reuse the excell application object
with locking? This because of performance. Has anybody have any experience
with using office from a webservice and the performance penalties?

Many thanks in advance,

Bar
 
D

Dan Rogers

Danger Will Robinson - warning warning. Alian technology approach
commencing. Warning.

Seriously, the answer is "don't". Excel does not make a good stateless
implementation, and has all kinds of icky "current user" and "logged in
user" requirements. The best you can do is try and get a web service that
runs as a user account (not a machine account) to use the Excel automation
interface to do calculations. It's messy - with VS.net, you need to call
COM objects - and the performance/lag is going to be problematic.

Top that off with a new instance of your spreadsheet being spun up for each
web method request, and you lose all of the interactivity that you expect
from COM automation of a stateful object like Excel.

You're better off enabling DCOM and using your spreadsheet remote.

--------------------
 
B

Bar

Hi Dan,
Alian technology approach
Ahh, Sometimes people say i look like ET. So this is why -:)

Let me elaborate on this. I have a lot of calculations in an excel worksheet
depending on 4 inputvariables which as a result gives two variables back. I
would like to use this calculations in my ASP.NET webapplication without
duplicating all the calculations in C#. So not wanting to install Excel on
my webserver i came up with this solution to use a webservice to remote
excel from another appserver. If i dont misunderstand you i am better off
using DCOM remoting in my ASP.NET web application to perform Excel
calculations from this appserver then using a webservice? In other words is
DCOM - ASP.NET combination giving me a better option to solve the
statefullnes and user requirements of Excel?

Thanks in advance,

Bar
 

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,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top