Advertisement

03.20.2008 at 11:55AM PDT, ID: 23258035
[x]
Attachment Details

Calling Excel Function from C# using Excel.Interop

Asked by vortex350 in Microsoft Visual C#.Net, Microsoft Excel Spreadsheet Software

Tags: C#

Hello All,
I am converting an excel file to a C# program. Some of the functions are not in the .net math library. So I want to use the Excel function using excel interop from my code without opening excel or even displaying a spreadsheet on screen. I just want the formula library.

Namespace is probably Microsoft.Office.Interop.Excel;

NORMDIST(x,mean,standard_dev,cumulative)
   X   is the value for which you want the distribution.
   Mean   is the arithmetic mean of the distribution.
   Standard_dev   is the standard deviation of the distribution

MEDIAN(number1,number2,...)
Number1, number2, ...   are 1 to 255 numbers for which you want the median.

I have never used interop before and found info on how to build an add-in for excel to call c# functions from excel (which is pretty cool btw). The thing is, I would like to use some of these function without having to re-develop them. Excel will be installed on the local machine, so no prob for deployment.




Start Free Trial
[+][-]03.20.2008 at 01:18PM PDT, ID: 21175432

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 01:22PM PDT, ID: 21175476

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 01:31PM PDT, ID: 21175567

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, Microsoft Excel Spreadsheet Software
Tags: C#
Sign Up Now!
Solution Provided By: Dabas
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628