[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IFormulaResolver

IFormulaResolver Interface

Provides custom name resolution for formulas.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IFormulaResolver
Public Interface IFormulaResolver
Examples
class CustomFormulaResolver : IFormulaResolver
{
    public bool IsCustomName(string text)
    {
        return text == "TaxRate";
    }

    public object Evaluate(string text)
    {
        return text == "TaxRate" ? 0.08 : null;
    }
}

IFormulaResolver resolver = new CustomFormulaResolver();
bool isCustomName = resolver.IsCustomName("TaxRate");
object value = resolver.Evaluate("TaxRate");

Methods

Name Description
Evaluate(string)

Evaluates the specified custom name and returns its value.

IsCustomName(string)

Determines whether the specified text is a custom name handled by this resolver.