Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Using excel in a webservice

Reply
Thread Tools

Using excel in a webservice

 
 
Bar
Guest
Posts: n/a
 
      03-21-2005
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


 
Reply With Quote
 
 
 
 
Dan Rogers
Guest
Posts: n/a
 
      03-22-2005
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.

--------------------
>Reply-To: "Bar" <>
>From: "Bar" <>
>Subject: Using excel in a webservice
>Date: Mon, 21 Mar 2005 14:38:35 +0100
>Lines: 16
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>X-RFC2646: Format=Flowed; Original
>Message-ID: <>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: ip503db89a.speed.planet.nl 80.61.184.154
>Path:

TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:28727
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>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
>
>
>


 
Reply With Quote
 
 
 
 
Bar
Guest
Posts: n/a
 
      03-22-2005
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



"Dan Rogers" <> wrote in message
news:...
> 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.
>
> --------------------
>>Reply-To: "Bar" <>
>>From: "Bar" <>
>>Subject: Using excel in a webservice
>>Date: Mon, 21 Mar 2005 14:38:35 +0100
>>Lines: 16
>>X-Priority: 3
>>X-MSMail-Priority: Normal
>>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>>X-RFC2646: Format=Flowed; Original
>>Message-ID: <>
>>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>>NNTP-Posting-Host: ip503db89a.speed.planet.nl 80.61.184.154
>>Path:

> TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1
> 2.phx.gbl
>>Xref: TK2MSFTNGXA02.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:28727
>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>>
>>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
>>
>>
>>

>



 
Reply With Quote
 
Manohar Kamath
Guest
Posts: n/a
 
      03-22-2005
Adding to what Dan just said, you could try a third-party "calculation
engine" to achieve the same thing. There is one from Infragistics:

http://www.infragistics.com/Products...eFeatures.aspx

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com


"Dan Rogers" <> wrote in message
news:...
> 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.
>
> --------------------
> >Reply-To: "Bar" <>
> >From: "Bar" <>
> >Subject: Using excel in a webservice
> >Date: Mon, 21 Mar 2005 14:38:35 +0100
> >Lines: 16
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
> >X-RFC2646: Format=Flowed; Original
> >Message-ID: <>
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: ip503db89a.speed.planet.nl 80.61.184.154
> >Path:

>

TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1
> 2.phx.gbl
> >Xref: TK2MSFTNGXA02.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:28727
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >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
> >
> >
> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
read a excel sheet using aspose.excel sajithkahawatta ASP .Net 3 04-19-2007 02:54 PM
Reading excel file using Java Excel API pps! Java 0 08-29-2006 12:05 PM
Error connection using webservice locally (3 webservice in balanci Roberto Giorgetti ASP .Net Web Services 0 06-13-2006 06:40 PM
using Microsoft Excel image for Export to Excel button =?Utf-8?B?U3JpZGhhcg==?= ASP .Net 0 12-09-2005 08:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57