Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use Excel as Maath Engine for VS.NET

I am trying to use the Excel object to perform
calculations within a VB.NET program.
I set an Excel object, pass a string argument to its
evaluate method and all seems to work OK until I try and
pass an array.
i.e

this works when S= "cos(3.673/4)/exp(-3.33)"
Dim xL As New Excel.Application
Dim B As String
B = xL._Evaluate(S).ToString

this doesn't when S = "Sum({1,2,3,4,5})
Dim xL As New Excel.Application
Dim B As String
B = xL._Evaluate(S).ToString

Any one got ideas???

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Use Excel as Maath Engine for VS.NET

Hi Andrew,

The following works fine for me:

MessageBox.Show(xlApp.Evaluate("SUM({1,2,3,4,5})") .ToString)

where xlApp is an running instance of the Excel Application object.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"andrew" wrote in message
...
I am trying to use the Excel object to perform
calculations within a VB.NET program.
I set an Excel object, pass a string argument to its
evaluate method and all seems to work OK until I try and
pass an array.
i.e

this works when S= "cos(3.673/4)/exp(-3.33)"
Dim xL As New Excel.Application
Dim B As String
B = xL._Evaluate(S).ToString

this doesn't when S = "Sum({1,2,3,4,5})
Dim xL As New Excel.Application
Dim B As String
B = xL._Evaluate(S).ToString

Any one got ideas???



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Excel Worksheet Functions 0 March 8th 07 04:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Excel Discussion (Misc queries) 0 March 8th 07 04:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Setting up and Configuration of Excel 0 March 8th 07 04:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Links and Linking in Excel 0 March 8th 07 04:08 AM
Seo , Search Engine Optimizer , Seo Search engine Optimization , search engine optimization services, SEO Consulting Se0 Guy Charts and Charting in Excel 0 March 8th 07 04:08 AM


All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"