473,888 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calling excel CORREL() in C#

1 New Member

I am newbie to c# coding. I am trying to call the MS-Excel Correl() in my C# code. From a decently comprehensive search on google I found that there is a Excel Interop COM library which could be added as a reference and used.
However i could not find relevant material regarding the usage of the Excel function in C#

using IExcel = Microsoft.Offic e.Interop.Excel ;
IExcel.IWorkshe etFunction wf = new IExcel.IWorkShe etFunctions();
wf.correl(arg1, arg2) // where arg1 and arg2 are two single dim arrays

The code pasted above throws an error as IWorkSheetFunct ion is an interface. I could not find a concrete implementation of IWorkSheetFunct ion.

Can some one help me please ?
Nov 26 '09 #1
0 1537

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Ben | last post by:
I have written a procedure which calls the CORREL function of Excel to run correlation analysis on two arrays, then populate a table with the resulting correlation coefficient. This process loops through several records and recordsets. The procedure works well for awhile (sometimes upwards of 10,000 times!), but then mysteriously begins populating "0" as the correlation coefficient (even though I know this to be inaccurate). Sometimes,...
by: elbyc | last post by:
I have a big ugly program in Excel that I'm trying to remake in Access. I'm not very good at either program I'm afraid. Right now I'm trying to call up the xla file that holds the code in Excel and borrow a lengthy procedure from it. I can't seem to get the xla file to load when I open the Excel workbook. Any ideas? Here's the Access code: Private Sub comRetrieveTracker_Click() On Error GoTo Err_comRetrieveTracker_Click
by: EJO | last post by:
In my app (A2k), I have the following code, which opens the file, but also brings up a pop-up which states the "subscript is out of range": Dim objXL As Object Dim objWkb As Object Dim objSht As Object Dim SRval, OLDir, Ver, filePath, fileList, CountVer Const OLInfo = "OL Template" Set objXL = GetObject("", "Excel.Application")
by: cr113 | last post by:
I just upgraded from Office 2000 to Office 2003. My VB.NET Excel macro calls don't work any longer. Here is how I make my Excel macro call from VB.NET: Dim objExcel as Excel.Application objExcel = New Excel.Application objExcel.Workbooks.Open(FileName:="c:\test.xls", ReadOnly:=True) objExcel.Run("test.xls!test.test")
by: Jaime Leivers | last post by:
Here's a median function in access that you can call in any query. You could change this to any excel function you wanted. Most people can find the windows help file that says how to call an excel function but don't know how to pass an array of the recordset they made into that function. This uses GetRows that nicely creates an array that can be passed into excel. I have this data table for testing. The table name is TestData ...
by: SpirosK | last post by:
Here is the issue. In a workbook I have 100 sheet with data at column b2:b1700 in everyone of them. I want to calculate the correlation btw all possible pairs. For sheet2 and sheet3 the function is =CORREL(sheet2!R2C2:R1700C2,sheet3!R2C2:R1700C2) I have tried to create a macro For i = 2 To Sheets.Count x = Sheets(i).Name Sheets(1).Cells(1, i).FormulaR1C1 = "=CORREL(x!R2C2:R1700C2,sheet3!R2C2:R1700C2)" Next i
by: jostein67 | last post by:
I have moved an ASP application to a new Windows server. Need to export data to Excel. Worked fine before. Not so anymore. Case: - Exporting data from ASP to Excel 2000, using Office Web Components. - Installed and reinstalled Excel, also checking that MSOWC.DLL is in the right spot on my disk. - Old server Win 2000/IIS 5, new server Win2003/IIS 6. - Have selected ALLOWED for all Web Extensions in IIS Manager (all ISAPI, all CGI, ASP,...
by: Gilbert Tordeur | last post by:
Hello, My Web application in VB2008 with IIS calls Excel (2003) to create an Excel file xls. I use therefore Microsoft.Office.Interop.Excel, version 11. This application does not use anonymous connections; it automaticaly uses the Windows userid. On my development PC, with local server, everything is OK. On a test server with IIS and Excel, my program gets an error on the first
by: keirnus | last post by:
Hello once again... I made a function in Excel. The function does some error checking within the Excel file. To be easy for me, I want my code in MS Access to simply call the function in Excel. I check this MS Support site: http://support.microsoft.com/kb/198571 I tried calling my function and it didn't work. Here's my MS Access code:
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.