We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Use Yield function of excel

Thread ID:

Created:

Updated:

Platform:

Replies:

71824 Feb 14,2008 12:03 PM Feb 16,2008 02:39 AM Windows Forms 1
loading
Tags: XlsIO
Sanjeev Soni
Asked On February 14, 2008 12:03 PM

Hi,

I am trying to use the YIELD function of excel via syncfusion.XlsIO. But it is giving error "Yield isn't custom function"

I tried using microsoft excel object and found that i have to add the addin in my code
oXL.AddIns["Analysis ToolPak - VBA"].Installed = true;

Can you please let me know who i can make this work using SyncFusion object.

Thanks
-Sanjeev Soni




Yavanaarasi G [Syncfusion]
Replied On February 16, 2008 02:39 AM

Hi sanjeev,

Thank you for your interest in Essential XlsIO.

In order to make XlsIO to use YIELD() function we need to register it as custom add-in function and make XlsIO also recognize it. We can do that by using the following code snippet:

//Define Function
IAddInFunctions unknownFunctions = workbook.AddInFunctions;
unknownFunctions.Add( "YIELD" );

//Use Function
sheet.Range[ "A3" ].Formula = "YIELD(A1+\" CORP\",\"PX_LAST\")";

Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/XlsIO.Windows/71824/main.htm

Please let me know if this helps.

Regards,
G.Yavana



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;