public static void registerFunction(String name, Function func){FunctionMetadata metaData = FunctionMetadataRegistry.getFunctionByName(name);if(metaData == null) {if(AnalysisToolPak.isATPFunction(name)) {throw new IllegalArgumentException(name + " is a function from the Excel Analysis Toolpack. " +"Use AnalysisToolpack.registerFunction(String name, FreeRefFunction func) instead.");}throw new IllegalArgumentException("Unknown function: " + name);}int idx = metaData.getIndex();if(functions[idx] instanceof NotImplementedFunction) {functions[idx] = func;} else {throw new IllegalArgumentException("POI already implememts " + name +". You cannot override POI's implementations of Excel functions");}}

public static void RegisterFunction(String name, Function func){FunctionMetadata metaData = FunctionMetadataRegistry.GetFunctionByName(name);if (metaData == null){if (AnalysisToolPak.IsATPFunction(name)){throw new ArgumentException(name + " is a function from the Excel Analysis Toolpack. " +"Use AnalysisToolpack.RegisterFunction(String name, FreeRefFunction func) instead.");}else{throw new ArgumentException("Unknown function: " + name);}}int idx = metaData.Index;if (functions[idx] is NotImplementedFunction){functions[idx] = func;}else{throw new ArgumentException("POI already implememts " + name +". You cannot override POI's implementations of Excel functions");}}
