@univerjs/engine-formula v0.5.4
Class: AsyncCustomFunction
Defined in: submodules/univer/packages/engine-formula/src/functions/custom-function.ts:25
Extends
Constructors
new AsyncCustomFunction()
new AsyncCustomFunction(_name): AsyncCustomFunction
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:92
Parameters
Parameter | Type |
---|---|
_name | IFunctionNames |
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_columnCount | protected | number | -1 | - | CustomFunction ._columnCount | submodules/univer/packages/engine-formula/src/functions/base-function.ts:50 |
_formulaDataModel | protected | Nullable <FormulaDataModel > | undefined | - | CustomFunction ._formulaDataModel | submodules/univer/packages/engine-formula/src/functions/base-function.ts:48 |
_rowCount | protected | number | -1 | - | CustomFunction ._rowCount | submodules/univer/packages/engine-formula/src/functions/base-function.ts:49 |
maxParams | public | number | -1 | Maximum number of parameters | CustomFunction .maxParams | submodules/univer/packages/engine-formula/src/functions/base-function.ts:90 |
minParams | public | number | -1 | Minimum number of parameters | CustomFunction .minParams | submodules/univer/packages/engine-formula/src/functions/base-function.ts:85 |
needsExpandParams | public | boolean | false | Whether the function needs to expand the parameters | CustomFunction .needsExpandParams | submodules/univer/packages/engine-formula/src/functions/base-function.ts:55 |
needsFormulaDataModel | public | boolean | false | Whether the function needs function methods in FormulaDataModel | CustomFunction .needsFormulaDataModel | submodules/univer/packages/engine-formula/src/functions/base-function.ts:75 |
needsLocale | public | boolean | false | Whether the function needs handle locale | CustomFunction .needsLocale | submodules/univer/packages/engine-formula/src/functions/base-function.ts:65 |
needsReferenceObject | public | boolean | false | Whether the function needs to pass in reference object | CustomFunction .needsReferenceObject | submodules/univer/packages/engine-formula/src/functions/base-function.ts:60 |
needsSheetRowColumnCount | public | boolean | false | Whether the function needs the number of rows and columns in the sheet | CustomFunction .needsSheetRowColumnCount | submodules/univer/packages/engine-formula/src/functions/base-function.ts:80 |
needsSheetsInfo | public | boolean | false | Whether the function needs sheets info | CustomFunction .needsSheetsInfo | submodules/univer/packages/engine-formula/src/functions/base-function.ts:70 |
Accessors
column
Get Signature
get column(): number
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:112
Returns
number
Inherited from
name
Get Signature
get name(): IFunctionNames
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:96
Returns
Inherited from
row
Get Signature
get row(): number
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:108
Returns
number
Inherited from
subUnitId
Get Signature
get subUnitId(): Nullable<string>
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:104
Returns
Nullable
<string
>
Inherited from
unitId
Get Signature
get unitId(): Nullable<string>
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:100
Returns
Nullable
<string
>
Inherited from
Methods
binarySearch()
binarySearch(
value,
searchArray,
resultArray,
searchType?,
matchType?): BaseValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:316
Parameters
Parameter | Type |
---|---|
value | BaseValueObject |
searchArray | ArrayValueObject |
resultArray | ArrayValueObject |
searchType ? | ArrayBinarySearchType |
matchType ? | ArrayOrderSearchType |
Returns
Inherited from
binarySearchExpand()
binarySearchExpand(
value,
searchArray,
resultArray,
axis,
searchType?,
matchType?):
| undefined
| ErrorValueObject
| ArrayValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:403
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
axis | number | 0 |
searchType ? | ArrayBinarySearchType | undefined |
matchType ? | ArrayOrderSearchType | undefined |
Returns
| undefined
| ErrorValueObject
| ArrayValueObject
Inherited from
CustomFunction
.binarySearchExpand
calculate()
calculate(...arg): NodeValueType
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:200
Parameters
Parameter | Type |
---|---|
…arg | BaseValueObject [] |
Returns
NodeValueType
Inherited from
calculateCustom()
calculateCustom(...arg):
| FormulaFunctionResultValueType
| Promise<FormulaFunctionResultValueType>
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:194
Parameters
Parameter | Type |
---|---|
…arg | FormulaFunctionValueType [] |
Returns
| FormulaFunctionResultValueType
| Promise
<FormulaFunctionResultValueType
>
Inherited from
CustomFunction
.calculateCustom
checkArrayType()
checkArrayType(variant): boolean
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:204
Parameters
Parameter | Type |
---|---|
variant | FunctionVariantType |
Returns
boolean
Inherited from
createReferenceObject()
createReferenceObject(reference, range):
| ErrorValueObject
| BaseReferenceObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:562
Parameters
Parameter | Type |
---|---|
reference | BaseReferenceObject |
range | IRange |
Returns
| ErrorValueObject
| BaseReferenceObject
Inherited from
CustomFunction
.createReferenceObject
dispose()
dispose(): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:116
Returns
void
Inherited from
equalSearch()
equalSearch(
value,
searchArray,
resultArray,
isFirst): BaseValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:361
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
isFirst | boolean | true |
Returns
Inherited from
equalSearchExpand()
equalSearchExpand(
value,
searchArray,
resultArray,
isFirst,
axis):
| undefined
| ErrorValueObject
| ArrayValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:423
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
isFirst | boolean | true |
axis | number | 0 |
Returns
| undefined
| ErrorValueObject
| ArrayValueObject
Inherited from
CustomFunction
.equalSearchExpand
flattenArray()
flattenArray(variants, ignoreLogicalValuesAndText):
| BaseValueObject
| ArrayValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:497
Parameters
Parameter | Type | Default value |
---|---|---|
variants | BaseValueObject [] | undefined |
ignoreLogicalValuesAndText | boolean | true |
Returns
| BaseValueObject
| ArrayValueObject
Inherited from
fuzzySearch()
fuzzySearch(
value,
searchArray,
resultArray,
isFirst): BaseValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:371
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
isFirst | boolean | true |
Returns
Inherited from
fuzzySearchExpand()
fuzzySearchExpand(
value,
searchArray,
resultArray,
isFirst,
axis):
| undefined
| ErrorValueObject
| ArrayValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:450
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
isFirst | boolean | true |
axis | number | 0 |
Returns
| undefined
| ErrorValueObject
| ArrayValueObject
Inherited from
CustomFunction
.fuzzySearchExpand
getDefinedName()
getDefinedName(name):
| null
| IDefinedNamesServiceParam
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:126
In Excel, to inject a defined name into a function that has positioning capabilities, such as using the INDIRECT function to reference a named range, you can write it as follows: =INDIRECT(“DefinedName1”)
Parameters
Parameter | Type |
---|---|
name | string |
Returns
| null
| IDefinedNamesServiceParam
Inherited from
getIndexNumValue()
getIndexNumValue(indexNum, defaultValue): number | ErrorValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:214
Starting with 1 For instance, The column number (starting with 1 for the left-most column of table_array) that contains the return value. https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1
Parameters
Parameter | Type | Default value |
---|---|---|
indexNum | BaseValueObject | undefined |
defaultValue | number | 1 |
Returns
number
| ErrorValueObject
Inherited from
CustomFunction
.getIndexNumValue
getLocale()
getLocale(): LocaleType
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:140
Returns
Inherited from
getMatchTypeValue()
getMatchTypeValue(logicValueObject?): undefined | number
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:288
A logical value that specifies 1/TRUE , 0/FALSE, -1, default 1. The difference from getZeroOrOneByOneDefault is that we need to get -1
Parameters
Parameter | Type |
---|---|
logicValueObject ? | BaseValueObject |
Returns
undefined
| number
Inherited from
CustomFunction
.getMatchTypeValue
getSheetsInfo()
getSheetsInfo(): {
sheetNameMap: {};
sheetOrder: string[];
}
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:148
Returns
{
sheetNameMap: {};
sheetOrder: string[];
}
Inherited from
getZeroOrOneByOneDefault()
getZeroOrOneByOneDefault(logicValueObject?): undefined | number
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:255
A logical value that specifies 1/TRUE , 0/FALSE, default 1 For instance range_lookup, A logical value that specifies whether you want VLOOKUP to find an approximate or an exact match Approximate match - 1/TRUE Exact match - 0/FALSE https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1 For instance A1, A logical value that specifies what type of reference is contained in the cell ref_text. If a1 is TRUE or omitted, ref_text is interpreted as an A1-style reference. If a1 is FALSE, ref_text is interpreted as an R1C1-style reference. https://support.microsoft.com/zh-cn/office/indirect-%E5%87%BD%E6%95%B0-474b3a3a-8a26-4f44-b491-92b6306fa261
Parameters
Parameter | Type |
---|---|
logicValueObject ? | BaseValueObject |
Returns
undefined
| number
Inherited from
CustomFunction
.getZeroOrOneByOneDefault
isAddress()
isAddress(): boolean
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:179
Returns
boolean
Inherited from
isAsync()
isAsync(): boolean
Defined in: submodules/univer/packages/engine-formula/src/functions/custom-function.ts:26
Returns
boolean
Overrides
isCustom()
isCustom(): boolean
Defined in: submodules/univer/packages/engine-formula/src/functions/custom-function.ts:20
Returns
boolean
Inherited from
orderSearch()
orderSearch(
value,
searchArray,
resultArray,
searchType,
isDesc): BaseValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:381
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
searchType | ArrayOrderSearchType | ArrayOrderSearchType.MIN |
isDesc | boolean | false |
Returns
Inherited from
orderSearchExpand()
orderSearchExpand(
value,
searchArray,
resultArray,
searchType,
isDesc,
axis):
| undefined
| ErrorValueObject
| ArrayValueObject
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:477
Parameters
Parameter | Type | Default value |
---|---|---|
value | BaseValueObject | undefined |
searchArray | ArrayValueObject | undefined |
resultArray | ArrayValueObject | undefined |
searchType | ArrayOrderSearchType | ArrayOrderSearchType.MIN |
isDesc | boolean | false |
axis | number | 0 |
Returns
| undefined
| ErrorValueObject
| ArrayValueObject
Inherited from
CustomFunction
.orderSearchExpand
setDefinedNames()
setDefinedNames(definedNames): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:136
Parameters
Parameter | Type |
---|---|
definedNames | IDefinedNameMapItem |
Returns
void
Inherited from
CustomFunction
.setDefinedNames
setFormulaDataModel()
setFormulaDataModel(_formulaDataModel): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:166
Parameters
Parameter | Type |
---|---|
_formulaDataModel | FormulaDataModel |
Returns
void
Inherited from
CustomFunction
.setFormulaDataModel
setLocale()
setLocale(locale): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:144
Parameters
Parameter | Type |
---|---|
locale | LocaleType |
Returns
void
Inherited from
setRefInfo()
setRefInfo(
unitId,
subUnitId,
row,
column): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:187
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
column | number |
Returns
void
Inherited from
setSheetRowColumnCount()
setSheetRowColumnCount(rowCount, columnCount): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:170
Parameters
Parameter | Type |
---|---|
rowCount | number |
columnCount | number |
Returns
void
Inherited from
CustomFunction
.setSheetRowColumnCount
setSheetsInfo()
setSheetsInfo(__namedParameters): void
Defined in: submodules/univer/packages/engine-formula/src/functions/base-function.ts:155
Parameters
Parameter | Type |
---|---|
__namedParameters | { sheetNameMap : {}; sheetOrder : string []; } |
__namedParameters.sheetNameMap | {} |
__namedParameters.sheetOrder | string [] |
Returns
void