diff options
| author | xuri <xuri.me@gmail.com> | 2022-06-24 01:03:19 +0800 | 
|---|---|---|
| committer | xuri <xuri.me@gmail.com> | 2022-06-24 01:03:19 +0800 | 
| commit | 2e1b0efadc0519fa4572b2437401bf2993366a07 (patch) | |
| tree | 8af25079777593916bfd4e40febea172d094a1f7 /calc.go | |
| parent | 61c71caf4fdd056a45c69d8f3aea2231da2c074a (diff) | |
ref #65, new formula function: HYPERLINK
Diffstat (limited to 'calc.go')
| -rw-r--r-- | calc.go | 15 | 
1 files changed, 15 insertions, 0 deletions
| @@ -14514,6 +14514,21 @@ func (fn *formulaFuncs) HLOOKUP(argsList *list.List) formulaArg {  	return newErrorFormulaArg(formulaErrorNA, "HLOOKUP no result found")  } +// HYPERLINK function creates a hyperlink to a specified location. The syntax +// of the function is: +// +//    HYPERLINK(link_location,[friendly_name]) +// +func (fn *formulaFuncs) HYPERLINK(argsList *list.List) formulaArg { +	if argsList.Len() < 1 { +		return newErrorFormulaArg(formulaErrorVALUE, "HYPERLINK requires at least 1 argument") +	} +	if argsList.Len() > 2 { +		return newErrorFormulaArg(formulaErrorVALUE, "HYPERLINK allows at most 2 arguments") +	} +	return newStringFormulaArg(argsList.Back().Value.(formulaArg).Value()) +} +  // calcMatch returns the position of the value by given match type, criteria  // and lookup array for the formula function MATCH.  func calcMatch(matchType int, criteria *formulaCriteria, lookupArray []formulaArg) formulaArg { | 
