350 static std::vector<double> collectNumbers(
const std::vector<XLCellValue>& flat,
bool countBlanks =
false);
366 using FuncArgs = std::vector<XLCellValue>;
367 using FuncImpl = std::function<
XLCellValue(
const std::vector<XLFormulaArg>&)>;
368 std::unordered_map<std::string, FuncImpl> m_functions;
370 void registerBuiltins();
373 static XLCellValue fnSum(
const std::vector<XLFormulaArg>& args);
374 static XLCellValue fnAverage(
const std::vector<XLFormulaArg>& args);
375 static XLCellValue fnMin(
const std::vector<XLFormulaArg>& args);
376 static XLCellValue fnMax(
const std::vector<XLFormulaArg>& args);
377 static XLCellValue fnCount(
const std::vector<XLFormulaArg>& args);
378 static XLCellValue fnCounta(
const std::vector<XLFormulaArg>& args);
379 static XLCellValue fnIf(
const std::vector<XLFormulaArg>& args);
380 static XLCellValue fnIfs(
const std::vector<XLFormulaArg>& args);
381 static XLCellValue fnSwitch(
const std::vector<XLFormulaArg>& args);
382 static XLCellValue fnAnd(
const std::vector<XLFormulaArg>& args);
383 static XLCellValue fnOr(
const std::vector<XLFormulaArg>& args);
384 static XLCellValue fnNot(
const std::vector<XLFormulaArg>& args);
385 static XLCellValue fnIferror(
const std::vector<XLFormulaArg>& args);
386 static XLCellValue fnAbs(
const std::vector<XLFormulaArg>& args);
387 static XLCellValue fnRound(
const std::vector<XLFormulaArg>& args);
388 static XLCellValue fnRoundup(
const std::vector<XLFormulaArg>& args);
389 static XLCellValue fnRounddown(
const std::vector<XLFormulaArg>& args);
390 static XLCellValue fnSqrt(
const std::vector<XLFormulaArg>& args);
391 static XLCellValue fnPi(
const std::vector<XLFormulaArg>& args);
392 static XLCellValue fnSin(
const std::vector<XLFormulaArg>& args);
393 static XLCellValue fnCos(
const std::vector<XLFormulaArg>& args);
394 static XLCellValue fnTan(
const std::vector<XLFormulaArg>& args);
395 static XLCellValue fnAsin(
const std::vector<XLFormulaArg>& args);
396 static XLCellValue fnAcos(
const std::vector<XLFormulaArg>& args);
397 static XLCellValue fnDegrees(
const std::vector<XLFormulaArg>& args);
398 static XLCellValue fnRadians(
const std::vector<XLFormulaArg>& args);
399 static XLCellValue fnRand(
const std::vector<XLFormulaArg>& args);
400 static XLCellValue fnRandbetween(
const std::vector<XLFormulaArg>& args);
401 static XLCellValue fnInt(
const std::vector<XLFormulaArg>& args);
402 static XLCellValue fnMod(
const std::vector<XLFormulaArg>& args);
403 static XLCellValue fnPower(
const std::vector<XLFormulaArg>& args);
404 static XLCellValue fnVlookup(
const std::vector<XLFormulaArg>& args);
405 static XLCellValue fnHlookup(
const std::vector<XLFormulaArg>& args);
406 static XLCellValue fnXlookup(
const std::vector<XLFormulaArg>& args);
407 static XLCellValue fnIndex(
const std::vector<XLFormulaArg>& args);
408 static XLCellValue fnMatch(
const std::vector<XLFormulaArg>& args);
409 static XLCellValue fnConcatenate(
const std::vector<XLFormulaArg>& args);
410 static XLCellValue fnLen(
const std::vector<XLFormulaArg>& args);
411 static XLCellValue fnLeft(
const std::vector<XLFormulaArg>& args);
412 static XLCellValue fnRight(
const std::vector<XLFormulaArg>& args);
413 static XLCellValue fnMid(
const std::vector<XLFormulaArg>& args);
414 static XLCellValue fnUpper(
const std::vector<XLFormulaArg>& args);
415 static XLCellValue fnLower(
const std::vector<XLFormulaArg>& args);
416 static XLCellValue fnTrim(
const std::vector<XLFormulaArg>& args);
417 static XLCellValue fnText(
const std::vector<XLFormulaArg>& args);
418 static XLCellValue fnIsnumber(
const std::vector<XLFormulaArg>& args);
419 static XLCellValue fnIsblank(
const std::vector<XLFormulaArg>& args);
420 static XLCellValue fnIserror(
const std::vector<XLFormulaArg>& args);
421 static XLCellValue fnIstext(
const std::vector<XLFormulaArg>& args);
424 static XLCellValue fnToday(
const std::vector<XLFormulaArg>& args);
425 static XLCellValue fnNow(
const std::vector<XLFormulaArg>& args);
426 static XLCellValue fnDate(
const std::vector<XLFormulaArg>& args);
427 static XLCellValue fnTime(
const std::vector<XLFormulaArg>& args);
428 static XLCellValue fnYear(
const std::vector<XLFormulaArg>& args);
429 static XLCellValue fnMonth(
const std::vector<XLFormulaArg>& args);
430 static XLCellValue fnDay(
const std::vector<XLFormulaArg>& args);
431 static XLCellValue fnHour(
const std::vector<XLFormulaArg>& args);
432 static XLCellValue fnMinute(
const std::vector<XLFormulaArg>& args);
433 static XLCellValue fnSecond(
const std::vector<XLFormulaArg>& args);
434 static XLCellValue fnDays(
const std::vector<XLFormulaArg>& args);
435 static XLCellValue fnWeekday(
const std::vector<XLFormulaArg>& args);
436 static XLCellValue fnEdate(
const std::vector<XLFormulaArg>& args);
437 static XLCellValue fnEomonth(
const std::vector<XLFormulaArg>& args);
438 static XLCellValue fnWorkday(
const std::vector<XLFormulaArg>& args);
439 static XLCellValue fnNetworkdays(
const std::vector<XLFormulaArg>& args);
442 static XLCellValue fnPmt(
const std::vector<XLFormulaArg>& args);
443 static XLCellValue fnFv(
const std::vector<XLFormulaArg>& args);
444 static XLCellValue fnPv(
const std::vector<XLFormulaArg>& args);
445 static XLCellValue fnNpv(
const std::vector<XLFormulaArg>& args);
448 static XLCellValue fnSumproduct(
const std::vector<XLFormulaArg>& args);
449 static XLCellValue fnCeil(
const std::vector<XLFormulaArg>& args);
450 static XLCellValue fnFloor(
const std::vector<XLFormulaArg>& args);
451 static XLCellValue fnLog(
const std::vector<XLFormulaArg>& args);
452 static XLCellValue fnLog10(
const std::vector<XLFormulaArg>& args);
453 static XLCellValue fnExp(
const std::vector<XLFormulaArg>& args);
454 static XLCellValue fnSign(
const std::vector<XLFormulaArg>& args);
457 static XLCellValue fnFind(
const std::vector<XLFormulaArg>& args);
458 static XLCellValue fnSearch(
const std::vector<XLFormulaArg>& args);
459 static XLCellValue fnSubstitute(
const std::vector<XLFormulaArg>& args);
460 static XLCellValue fnReplace(
const std::vector<XLFormulaArg>& args);
461 static XLCellValue fnRept(
const std::vector<XLFormulaArg>& args);
462 static XLCellValue fnExact(
const std::vector<XLFormulaArg>& args);
463 static XLCellValue fnT(
const std::vector<XLFormulaArg>& args);
464 static XLCellValue fnValue(
const std::vector<XLFormulaArg>& args);
465 static XLCellValue fnTextjoin(
const std::vector<XLFormulaArg>& args);
466 static XLCellValue fnClean(
const std::vector<XLFormulaArg>& args);
467 static XLCellValue fnProper(
const std::vector<XLFormulaArg>& args);
470 static XLCellValue fnSumif(
const std::vector<XLFormulaArg>& args);
471 static XLCellValue fnCountif(
const std::vector<XLFormulaArg>& args);
472 static XLCellValue fnSumifs(
const std::vector<XLFormulaArg>& args);
473 static XLCellValue fnCountifs(
const std::vector<XLFormulaArg>& args);
474 static XLCellValue fnMaxifs(
const std::vector<XLFormulaArg>& args);
475 static XLCellValue fnMinifs(
const std::vector<XLFormulaArg>& args);
476 static XLCellValue fnAverageif(
const std::vector<XLFormulaArg>& args);
477 static XLCellValue fnRank(
const std::vector<XLFormulaArg>& args);
478 static XLCellValue fnLarge(
const std::vector<XLFormulaArg>& args);
479 static XLCellValue fnSmall(
const std::vector<XLFormulaArg>& args);
480 static XLCellValue fnStdev(
const std::vector<XLFormulaArg>& args);
481 static XLCellValue fnVar(
const std::vector<XLFormulaArg>& args);
482 static XLCellValue fnMedian(
const std::vector<XLFormulaArg>& args);
483 static XLCellValue fnCountblank(
const std::vector<XLFormulaArg>& args);
486 static XLCellValue fnIsna(
const std::vector<XLFormulaArg>& args);
487 static XLCellValue fnIfna(
const std::vector<XLFormulaArg>& args);
488 static XLCellValue fnIslogical(
const std::vector<XLFormulaArg>& args);
491 static XLCellValue fnTrue(
const std::vector<XLFormulaArg>& args);
492 static XLCellValue fnFalse(
const std::vector<XLFormulaArg>& args);
493 static XLCellValue fnIseven(
const std::vector<XLFormulaArg>& args);
494 static XLCellValue fnIsodd(
const std::vector<XLFormulaArg>& args);
495 static XLCellValue fnMround(
const std::vector<XLFormulaArg>& args);
496 static XLCellValue fnCeilingMath(
const std::vector<XLFormulaArg>& args);
497 static XLCellValue fnFloorMath(
const std::vector<XLFormulaArg>& args);
498 static XLCellValue fnVarp(
const std::vector<XLFormulaArg>& args);
499 static XLCellValue fnStdevp(
const std::vector<XLFormulaArg>& args);
500 static XLCellValue fnVara(
const std::vector<XLFormulaArg>& args);
501 static XLCellValue fnVarpa(
const std::vector<XLFormulaArg>& args);
502 static XLCellValue fnStdeva(
const std::vector<XLFormulaArg>& args);
503 static XLCellValue fnStdevpa(
const std::vector<XLFormulaArg>& args);
504 static XLCellValue fnPermut(
const std::vector<XLFormulaArg>& args);
505 static XLCellValue fnPermutationa(
const std::vector<XLFormulaArg>& args);
506 static XLCellValue fnFisher(
const std::vector<XLFormulaArg>& args);
507 static XLCellValue fnFisherinv(
const std::vector<XLFormulaArg>& args);
508 static XLCellValue fnStandardize(
const std::vector<XLFormulaArg>& args);
509 static XLCellValue fnPearson(
const std::vector<XLFormulaArg>& args);
510 static XLCellValue fnRsq(
const std::vector<XLFormulaArg>& args);
511 static XLCellValue fnAverageifs(
const std::vector<XLFormulaArg>& args);
512 static XLCellValue fnIsoweeknum(
const std::vector<XLFormulaArg>& args);
513 static XLCellValue fnWeeknum(
const std::vector<XLFormulaArg>& args);
514 static XLCellValue fnDays360(
const std::vector<XLFormulaArg>& args);
515 static XLCellValue fnNper(
const std::vector<XLFormulaArg>& args);
516 static XLCellValue fnDb(
const std::vector<XLFormulaArg>& args);
517 static XLCellValue fnDdb(
const std::vector<XLFormulaArg>& args);
518 static XLCellValue fnIserr(
const std::vector<XLFormulaArg>& args);
519 static XLCellValue fnTrunc(
const std::vector<XLFormulaArg>& args);
520 static XLCellValue fnSumsq(
const std::vector<XLFormulaArg>& args);
521 static XLCellValue fnSumx2my2(
const std::vector<XLFormulaArg>& args);
522 static XLCellValue fnSumx2py2(
const std::vector<XLFormulaArg>& args);
523 static XLCellValue fnSumxmy2(
const std::vector<XLFormulaArg>& args);
524 static XLCellValue fnAvedev(
const std::vector<XLFormulaArg>& args);
525 static XLCellValue fnDevsq(
const std::vector<XLFormulaArg>& args);
526 static XLCellValue fnAveragea(
const std::vector<XLFormulaArg>& args);
527 static XLCellValue fnSln(
const std::vector<XLFormulaArg>& args);
528 static XLCellValue fnSyd(
const std::vector<XLFormulaArg>& args);
529 static XLCellValue fnChar(
const std::vector<XLFormulaArg>& args);
530 static XLCellValue fnUnichar(
const std::vector<XLFormulaArg>& args);
531 static XLCellValue fnCode(
const std::vector<XLFormulaArg>& args);
532 static XLCellValue fnUnicode(
const std::vector<XLFormulaArg>& args);
533 static XLCellValue fnCovarianceP(
const std::vector<XLFormulaArg>& args);
534 static XLCellValue fnCovarianceS(
const std::vector<XLFormulaArg>& args);
535 static XLCellValue fnTrimmean(
const std::vector<XLFormulaArg>& args);
536 static XLCellValue fnSlope(
const std::vector<XLFormulaArg>& args);
537 static XLCellValue fnIntercept(
const std::vector<XLFormulaArg>& args);
538 static XLCellValue fnPercentileInc(
const std::vector<XLFormulaArg>& args);
539 static XLCellValue fnPercentileExc(
const std::vector<XLFormulaArg>& args);
540 static XLCellValue fnQuartileInc(
const std::vector<XLFormulaArg>& args);
541 static XLCellValue fnQuartileExc(
const std::vector<XLFormulaArg>& args);
542 static XLCellValue fnIsnontext(
const std::vector<XLFormulaArg>& args);