How to use Microsoft Excel to calculate a statistical/mathematical/financial function from ATEasy

Knowledge Base Article # Q200080

Read Prior Article Read Next Article
Summary Example to show how calculates a statistical/mathematical/financial or any other excel function from ATEasy.
The example creates a hidden Excel workbook, fill the data and calculate TINV value and return it to ATEasy.

TINV Excel function used in this example returns the t-value of the Student's t-distribution as a function of the probability and the degrees of freedom.

You can modify the example to calculate and to use any excel mathematical/statistical/financial formula.

ob: Object

if ob=Nothing
    MsgBox("Unable to Create Excel.Application. Check if MS Excel is intsalled properly. Aborting...")
ob.Caption="ATEasy Excel Function Call Using COM"
ob.Visible=TRUE     ! show/activate execl main window

ob.Workbooks.Add()  ! add workbook

ob.Cells.Item(1, 1).Value = 0.054644927
ob.Cells.Item(2, 1).Value = 60.0
ob.Cells.Item(1, 2).Value = "=TINV(A1, A2)"

print ob.Cells.Item(1, 2).Value

ob.Workbooks.Item(1).Close(FALSE)    ! close workbook do not save changes
Article Date 12/7/2006 3:21:14 PM
Keywords ATEasy, Excel, CreateObject, TINV, Object

0 ratings | 0 out of 5
Read Prior Article Read Next Article