Query to call excel function "YIELD" in C# Code

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I need to call Yield function (excel function) in my c# code. I have import all prerequeists with their refrences dlls as below References & includes  are
Interop.Excel<br/>Microsoft.Office.Interop.Excel
Office_12 = Microsoft.Office.Interop.Excel<br/>Office_12 = Microsoft.Office.Interop;
 
on my button click i have done this
 
Excel_12.Application xl = new Excel_12.Application(); <br/>Excel_12.WorksheetFunction wsf = xl.WorksheetFunction;
 bid = wsf.YieldMat(satelmentdt, maturitydt,couponrate, bidprice,facevalue,frequency);
here WSF object gives YieldMat, YieldDisc but not only YIELD i.e avaialabe in my excel financial functions.<br/>Kindly do help me in this regards does their any other name has this YIELD function or i have missed some refernece..<br/>Help me GURUZZ
 
 
 
 
 

View the full article
 
Back
Top