OWC LINEST problem - VBScript 
Author Message
 OWC LINEST problem - VBScript

Hi,

I am using OWC with ASP to perform a multiple regression calculation.
The command used to perform such a regression is LINEST
It is common knowledge that LINEST (with the stats option turned on) returns
an array of values (not just 1).
I need the whole array of values. So I tried the following
----------------------------------------------------------------------------
------------------------------------

1) // CREATE A SPREADSHEET

Dim objSpreadsheet
Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet")

2) // I NOW POPULATE ROWS 1 TO 60 IN COLUMNS A THROUGH F

..Not relevant here

3) //NOW I SPECIFY AN ARRAY OF CELLS WHICH SHOULD CONTAIN THE RESULTS OF THE
    //REGRESSION PERFORMED ON COLUMNS (B,C,D,E) vs (F)
    //**********  THIS IS WHERE IT FAILS *****************//

objSpreadsheet.Range("J10","N14").Formula = "=LINEST(f1:f" & high & ",b1:e"
& high & ",,1)"
Response.Write objSpreadsheet.Cells(10,10)
objSpreadsheet.ActiveSheet.Export "C:\Inetpub\wwwroot\Temp\FooBar.xls", 0
----------------------------------------------------------------------------
------------------------------------

When I open the spreadsheet after this I find that the LINEST formula has
been extrapolated along the specified matrix.
i.e 10,10 has LINEST(F1:F60,B1:E60,,true) and the next cell has
LINEST(G1:G60,C1:F60,,true) and so on.
What I need is a whole array that has the exact same formula. What I get is
a formula extended over an array.

Am i doing something wrong ? Is what I need supported in OWC ?
This has been driving me NUTS over the past 1 week, so please help me :-(

Many thanks in advance,
Sai M Krishnakumar.



Tue, 01 Feb 2005 00:31:57 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Transferring Data between Oracle and Sql Server: Help.....Please....

2. Database API

3. OWC LINEST problem - VBScript

4. OWC Excel LINEST Function

5. ODBC Repair & Compact problem with Access DB

6. source for TvirtualDataset?

7. Problems with OWC.Chart and SetData

8. OWC MS Office Spreadsheet problem

9. Creating OWC Spreadsheet Problem

10. OWC Spreadsheet problem

11. Bug in Excel Visual Basic - LinEst function?

12. LINEST & a Type Mismatch

 

 
Powered by phpBB® Forum Software