How to use Excel formulas in C# -


i want calculate right-tailed probability of chi-squared distribution in c#. excel can calculation using following code

= chisq.dist.rt(100,4) 

where 100 chi-squared , 4 degree of freedom.

i want use function in c# calculation; tried adding reference "microsoft.office.interop" not find way use !

i came across topics of how use c# formulations in excel , results in excel, unfortunately not need; need calculation in c# , results in c#.

if wanting calculation similar excel calculation, should consider @korolewi's suggested comment.

if have use excel's engine, can

  1. what previous poster suggested, require instance of excel installed on web server , launch excel each time code executed, etc. bad practice , unsupported microsoft
  2. use third party tool aspose.com's cells. set formula, calculate it, , value wookbook without opening excel on server.

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -