Excel.FunctionResult class
包含函数计算操作结果的 对象
注解
使用方
- Excel.Functions:abs、accrInt、accrIntM、acos、acosh、acot、acoth、amorDegrc、amorLinc和、arabic、areas、asc、asinh、atan、atan2、atanh、aveDev、average、averageA、averageIf、averageIf、averageIf、泰铢Text、base、besselI、besselJ、besselK、besselY、beta_Dist、beta_Inv、bin2Dec、bin2Hex、bin2Oct、binom_Dist、binom_Dist_Range、binom_Inv、bitand、bitlshift、bitor、bitrshift、bitxor、ceiling_Math、ceiling_Precise、char、chiSq_Dist、chiSq_Dist_RT、chiSq_Inv、chiSq_Inv_RT、选择、清理、代码、列、组合、组合、复杂、连接、confidence_Norm、confidence_T、转换、cos、cosh、cot、coth、count、countA、countBlank、countIf、countIfs、coupDayBs、coupDays、coupDaysNc、coupNcd、coupNum、coupPcd、csc、csch、csch、cumPrinc、date、datevalue、daverage、day、days360、db、dbcs、dcount、dcountA、ddb、dec2Bin、dec2Hex、dec2Oct、decimal、 degrees, delta, devSq, dget, disc, dmax, dmin, dollar, dollarDe, dollarFr, dproduct, dstDev, dstDevP, dsum, duration, dvar, dvarP, ecma_Ceiling, edate, effect, eoMonth, erf, erf_Precise,erfC, erfC_Precise, error_Type, even, exact, exp, expon_Dist, f_Dist, f_Dist_RT, f_Inv, f_Inv_RT, fact, factDouble, false, find, findB, fisher, fisherInv, fixed, floor_Math, floor_Precise, fv、fvschedule、gamma、gamma_Dist、gamma_Inv、gammaLn、gammaLn_Precise、gauss、gcd、geoMean、geStep、harMean、hex2Bin、hex2Dec、hex2Oct、hlookup、hour、hyperlink、hypGeom_Dist、if、imAbs、假想、imArgument、imConjugate、imCos、imCosh、imCot、imCsc、imCsch、imDiv、imExp、imLn、imLog10、imLog2、imPower、imProduct、imReal、imSec、imSech、imSin、imSinh、imSqrt、imSub、imSum、imTan、int、intRate、ipmt、irr、isErr、isErr、isError、isEven、isFormula、isLogical、isNA、isNonText、isNumber、iso_Ceiling、isOdd、isoWeekNum、ispmt、isref、isText、kurt、large、lcm、 left, leftb, len, lenb, ln, log, log10, logNorm_Dist, logNorm_Inv, lookup, lower, match, max, maxA, mduration, median, mid, mid, midb, min, minA, minute, mirr, mod, month,mround、multiNomial、n、na、negBinom_Dist、networkDays、networkDays_Intl、nominal、norm_Dist、norm_Inv、norm_S_Dist、norm_S_Inv、not、now、nper、npv、numberValue、oct2Bin、oct2Dec、oct2Hex、odd、oddFPrice、oddFYield、oddLPrice、oddLYield或、pduration、percentile_Exc、percentile_Inc、percentRank_Exc、percentRank_Inc、permutationa、phi、pi、pmt、poisson_Dist、power、ppmt、price、priceDisc、priceMat, product, proper, pv, quartile_Exc, quartile_Inc, 商,radians, rand, randBetween, rank_Avg, rank_Eq, rate, received, replaceb, rept, right, rightb, roman, round, roundDown, roundUp, rows, rri, sec, sech, second, seriesSum, sheet, sign, sin, sin, sinh, skew, skew_p, sln, small, sqrt, sqrt, sqrtPi, 标准化, stDev_P, stDev_S, stDevA, stDevPA, substitute, subtotal, sum, sumIf, sumIfs, sumSq, syd, t, t_Dist, t_Dist_2T, t_Dist_RT, t_Inv, t_Inv_2T, tan, tanh, tbillEq, tbillPrice, tbillYield, text, time, timevalue, today、trim、trimMean、true、trunc、type、unichar、unicode、upper、usdollar、value、var_P、var_S、varA、varPA、vdb、vlookup、weekday、weekNum、weibull_Dist、workDay、workDay_Intl、xirr、xnpv、xor、year、yearFrac、yieldDisc、yieldMat、z_Test
属性
| context | 与 对象关联的请求上下文。 这会将加载项的进程连接到 Office 主机应用程序的进程。 |
| error | 错误值 (,例如“#DIV/0”) 表示错误。 如果未设置错误字符串,则函数成功,其结果将写入 Value 字段。 错误始终位于英语区域设置中。 |
| value | 函数计算的值。 仅当 (未发生错误时,才会填充值字段,即未) 设置 Error 属性。 |
方法
| load(options) | 将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 |
| load(property |
将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 |
| load(property |
将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 |
| toJSON() | 重写 JavaScript |
属性详细信息
context
error
错误值 (,例如“#DIV/0”) 表示错误。 如果未设置错误字符串,则函数成功,其结果将写入 Value 字段。 错误始终位于英语区域设置中。
readonly error: string;
属性值
string
注解
value
方法详细信息
load(options)
将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()。
load(options?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult<T>;
参数
提供要加载对象的属性的选项。
返回
load(propertyNames)
将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()。
load(propertyNames?: string | string[]): FunctionResult<T>;
参数
- propertyNames
-
string | string[]
逗号分隔的字符串或指定要加载的属性的字符串数组。
返回
load(propertyNamesAndPaths)
将命令加入队列以加载对象的指定属性。 阅读属性前必须先调用 context.sync()。
load(propertyNamesAndPaths?: {
select?: string;
expand?: string;
}): FunctionResult<T>;
参数
- propertyNamesAndPaths
-
{ select?: string; expand?: string; }
propertyNamesAndPaths.select 是一个逗号分隔的字符串,指定要加载的属性,是 propertyNamesAndPaths.expand 一个逗号分隔的字符串,指定要加载的导航属性。
返回
toJSON()
重写 JavaScript toJSON() 方法,以便在将 API 对象传递给 JSON.stringify()时提供更有用的输出。
JSON.stringify
(,依次调用toJSON传递给它的 对象的 方法。) 虽然原始FunctionResult<T>对象是 API 对象,toJSON但该方法返回一个纯 JavaScript 对象, (类型为 Interfaces.FunctionResultData<T>) ,其中包含从原始对象加载的任何子属性的浅表副本。
toJSON(): Interfaces.FunctionResultData<T>;