Articles in this section
Category / Section

How can I add user-defined formulas to an instance of IWorkbook?

1 min read

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

C#

//Define Function
IAddInFunctions unknownFunctions = workbook.AddInFunctions;
unknownFunctions.Add( "TEST" );
//Use Function
sheet.Range[ "A1" ].Formula = "TEST(45)";

VB.NET

'Define Function
Dim unknownFunctions As IAddInFunctions = workbook.AddInFunctions
unknownFunctions.Add("TEST")
'Use Function
sheet.Range("A1").Formula = "TEST(45)"

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied