Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

Using excel in a webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bar - 21 Mar 2005 14:38 GMT
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
Dan Rogers - 22 Mar 2005 03:04 GMT
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" <nomail@nomail.com>
>From: "Bar" <nomail@nomail.com>
[quoted text clipped - 10 lines]
>NNTP-Posting-Host: ip503db89a.speed.planet.nl 80.61.184.154
>Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:28727
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 12 lines]
>
>Bar
Bar - 22 Mar 2005 10:42 GMT
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

> Danger Will Robinson - warning warning.  Alian technology approach
> commencing.  Warning.
[quoted text clipped - 48 lines]
>>
>>Bar
Manohar Kamath - 22 Mar 2005 16:49 GMT
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/NetAdvantage/WinForms/CalcEngineFeatures.aspx

Signature

Manohar Kamath
Editor, .netWire
www.dotnetwire.com

> Danger Will Robinson - warning warning.  Alian technology approach
> commencing.  Warning.
[quoted text clipped - 27 lines]
> >NNTP-Posting-Host: ip503db89a.speed.planet.nl 80.61.184.154
> >Path:

TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
> 2.phx.gbl
> >Xref: TK2MSFTNGXA02.phx.gbl
[quoted text clipped - 15 lines]
> >
> >Bar

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.