Commit 4532e835 authored by Alexander.Trofimov's avatar Alexander.Trofimov

error in function SUBTOTAL

parent 759fe251
......@@ -3847,82 +3847,59 @@ cSUBTOTAL.prototype.Calculate = function ( arg ) {
switch ( arg0 ) {
case cSubTotalFunctionType.includes.AVERAGE:
this.value = (new cAVERAGE()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.COUNT:
this.value = (new cCOUNT()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.COUNTA:
this.value = (new cCOUNTA()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.MAX:
this.value = (new cMAX()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.MIN:
this.value = (new cMIN()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.PRODUCT:
this.value = (new cPRODUCT()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.STDEV:
this.value = (new cSTDEV()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.STDEVP:
this.value = (new cSTDEVP()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.SUM:
this.value = (new cSUM()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.VAR:
this.value = (new cVAR()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.VARP:
this.value = (new cVARP()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.excludes.AVERAGE:
this.value = (new cAVERAGE()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cAVERAGE()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.COUNT:
case cSubTotalFunctionType.excludes.COUNT:
this.value = (new cCOUNT()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cCOUNT()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.COUNTA:
case cSubTotalFunctionType.excludes.COUNTA:
this.value = (new cCOUNTA()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cCOUNTA()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.MAX:
case cSubTotalFunctionType.excludes.MAX:
this.value = (new cMAX()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cMAX()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.MIN:
case cSubTotalFunctionType.excludes.MIN:
this.value = (new cMIN()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cMIN()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.PRODUCT:
case cSubTotalFunctionType.excludes.PRODUCT:
this.value = (new cPRODUCT()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.STDEV:
case cSubTotalFunctionType.excludes.STDEV:
this.value = (new cSTDEV()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cSTDEV()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.STDEVP:
case cSubTotalFunctionType.excludes.STDEVP:
this.value = (new cSTDEVP()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cSTDEVP()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.SUM:
case cSubTotalFunctionType.excludes.SUM:
this.value = (new cSUM()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.VAR:
case cSubTotalFunctionType.excludes.VAR:
this.value = (new cVAR()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cVAR()).Calculate(arg.slice(1));
break;
case cSubTotalFunctionType.includes.VARP:
case cSubTotalFunctionType.excludes.VARP:
this.value = (new cVARP()).Calculate(arg.slice(1));
this.value = (new AscCommonExcel.cVARP()).Calculate(arg.slice(1));
break;
}
return this.value;
}
};
cSUBTOTAL.prototype.getInfo = function () {
return {
name:this.name,
args:"( function-number , argument-list )"
};
}
};
function cSUM() {
// cBaseFunction.call( this, "SUM" );
......
......@@ -5696,4 +5696,13 @@ cZTEST.prototype = Object.create( cBaseFunction.prototype );
window['AscCommonExcel'].phi = phi;
window['AscCommonExcel'].gauss = gauss;
window['AscCommonExcel'].gaussinv = gaussinv;
window['AscCommonExcel'].cAVERAGE = cAVERAGE;
window['AscCommonExcel'].cCOUNT = cCOUNT;
window['AscCommonExcel'].cCOUNTA = cCOUNTA;
window['AscCommonExcel'].cMAX = cMAX;
window['AscCommonExcel'].cMIN = cMIN;
window['AscCommonExcel'].cSTDEV = cSTDEV;
window['AscCommonExcel'].cSTDEVP = cSTDEVP;
window['AscCommonExcel'].cVAR = cVAR;
})(window);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment