[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IFormulaResolver.IsCustomName

IsCustomName Method

IsCustomName(string)

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

Declaration
bool IsCustomName(string text)
Function IsCustomName(text As String) As Boolean
Parameters
Type Name Description
string text

The formula text or name to check.

Returns
Type Description
bool

true if the text is a custom name; otherwise, false.

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