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)"