Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
aaaf7a86
Commit
aaaf7a86
authored
Apr 28, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error in function SUBTOTAL
parent
a933c7a6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
44 deletions
+30
-44
cell/model/FormulaObjects/mathematicFunctions.js
cell/model/FormulaObjects/mathematicFunctions.js
+21
-44
cell/model/FormulaObjects/statisticalFunctions.js
cell/model/FormulaObjects/statisticalFunctions.js
+9
-0
No files found.
cell/model/FormulaObjects/mathematicFunctions.js
View file @
aaaf7a86
...
...
@@ -3823,82 +3823,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" );
...
...
cell/model/FormulaObjects/statisticalFunctions.js
View file @
aaaf7a86
...
...
@@ -5672,4 +5672,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
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment