PC Review


Reply
Thread Tools Rate Thread

Can VB.net reuse Excel's math library?

 
 
sam
Guest
Posts: n/a
 
      25th Aug 2003

There are many formuls' library in Excel.
Can I call them in my VB program?

Thanks.
 
Reply With Quote
 
 
 
 
Paul Clement
Guest
Posts: n/a
 
      25th Aug 2003
On Mon, 25 Aug 2003 08:29:08 -0700, "sam" <(E-Mail Removed)> wrote:

¤
¤ There are many formuls' library in Excel.
¤ Can I call them in my VB program?

The following code uses a function (XIRR) from the Analysis TookPak

Private Sub RunExcelFunction_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles RunExcelFunction.Click

Dim td(3) As Integer
Dim td1(3) As Date
td(0) = -100
td(1) = 200
td(2) = 200

td1(0) = #8/1/2000#
td1(1) = #9/1/2000#
td1(2) = #10/1/2000#

Dim objExcel As New Excel.Application()

objExcel.RegisterXLL("C:\Program Files\Microsoft
Office\Office\Library\Analysis\ANALYS32.XLL")

Dim dos As Double
dos = CType(objExcel.Run("XIRR", td, td1), Double)

objExcel.Quit()
objExcel = Nothing

End Sub


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Reuse slides view of SharePoint slide library Jen Microsoft Powerpoint 0 13th Apr 2009 08:53 PM
Math Library =?Utf-8?B?cmFqdQ==?= Microsoft C# .NET 2 4th Sep 2007 07:26 PM
excel math forumla? (simple math problem inside for math people!) Jason Microsoft Excel Discussion 3 16th Feb 2006 10:54 AM
Fastest/Best C# Math Library Michael Microsoft C# .NET 2 7th Aug 2005 12:15 PM
Math library. sam Microsoft VC .NET 0 27th Aug 2003 10:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:28 PM.