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
422954f6
Commit
422954f6
authored
Jul 19, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ISFORMULA formula
parent
c847d995
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
15 deletions
+34
-15
cell/model/FormulaObjects/_xlfnFunctions.js
cell/model/FormulaObjects/_xlfnFunctions.js
+2
-14
cell/model/FormulaObjects/informationFunctions.js
cell/model/FormulaObjects/informationFunctions.js
+32
-1
No files found.
cell/model/FormulaObjects/_xlfnFunctions.js
View file @
422954f6
...
...
@@ -64,13 +64,13 @@
cFormulaFunctionGroup
[
'
LookupAndReference
'
]
=
cFormulaFunctionGroup
[
'
LookupAndReference
'
]
||
[];
cFormulaFunctionGroup
[
'
LookupAndReference
'
].
push
(
cFORMULATEXT
);
cFormulaFunctionGroup
[
'
Information
'
]
=
cFormulaFunctionGroup
[
'
Information
'
]
||
[];
cFormulaFunctionGroup
[
'
Information
'
].
push
(
c
ISFORMULA
,
c
SHEET
,
cSHEETS
);
cFormulaFunctionGroup
[
'
Information
'
].
push
(
cSHEET
,
cSHEETS
);
cFormulaFunctionGroup
[
'
NotRealised
'
]
=
cFormulaFunctionGroup
[
'
NotRealised
'
]
||
[];
cFormulaFunctionGroup
[
'
NotRealised
'
].
push
(
cDAYS
,
cISOWEEKNUM
,
cBITAND
,
cBITLSHIFT
,
cBITOR
,
cBITRSHIFT
,
cBITXOR
,
cDBCS
,
cUNICHAR
,
cUNICODE
,
cBINOM_DIST_RANGE
,
cF_TEST
,
cFORECAST_ETS
,
cFORECAST_ETS_CONFINT
,
cFORECAST_ETS_SEASONALITY
,
cFORECAST_ETS_STAT
,
cHYPGEOM_DIST
,
cPDURATION
,
cAGGREGATE
,
cMUNIT
,
cFORMULATEXT
,
c
ISFORMULA
,
c
SHEET
,
cSHEETS
);
cAGGREGATE
,
cMUNIT
,
cFORMULATEXT
,
cSHEET
,
cSHEETS
);
/**
* @constructor
...
...
@@ -288,18 +288,6 @@
cHYPGEOM_DIST
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cHYPGEOM_DIST
.
prototype
.
constructor
=
cHYPGEOM_DIST
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cISFORMULA
()
{
cBaseFunction
.
call
(
this
,
"
ISFORMULA
"
);
this
.
isXLFN
=
true
;
}
cISFORMULA
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cISFORMULA
.
prototype
.
constructor
=
cISFORMULA
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
...
...
cell/model/FormulaObjects/informationFunctions.js
View file @
422954f6
...
...
@@ -51,7 +51,7 @@
var
cFormulaFunctionGroup
=
AscCommonExcel
.
cFormulaFunctionGroup
;
cFormulaFunctionGroup
[
'
Information
'
]
=
cFormulaFunctionGroup
[
'
Information
'
]
||
[];
cFormulaFunctionGroup
[
'
Information
'
].
push
(
cERROR_TYPE
,
cISBLANK
,
cISERR
,
cISERROR
,
cISEVEN
,
cISLOGICAL
,
cISNA
,
cFormulaFunctionGroup
[
'
Information
'
].
push
(
cERROR_TYPE
,
cISBLANK
,
cISERR
,
cISERROR
,
cISEVEN
,
cIS
FORMULA
,
cIS
LOGICAL
,
cISNA
,
cISNONTEXT
,
cISNUMBER
,
cISODD
,
cISREF
,
cISTEXT
,
cN
,
cNA
,
cTYPE
);
/**
...
...
@@ -240,6 +240,37 @@
}
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cISFORMULA
()
{
this
.
name
=
"
ISFORMULA
"
;
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cISFORMULA
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cISFORMULA
.
prototype
.
constructor
=
cISFORMULA
;
cISFORMULA
.
prototype
.
argumentsMin
=
1
;
cISFORMULA
.
prototype
.
argumentsMax
=
1
;
cISFORMULA
.
prototype
.
Calculate
=
function
(
arg
)
{
//есть различия в поведении этой формулы для ms и lo(для нескольких ячеек с данными)
var
arg0
=
arg
[
0
];
var
res
=
false
;
if
((
arg0
instanceof
cArea
||
arg0
instanceof
cArea3D
)
&&
arg0
.
range
)
{
res
=
arg0
.
range
.
isFormula
();
}
else
if
((
arg0
instanceof
cRef
||
arg0
instanceof
cRef3D
)
&&
arg0
.
range
)
{
res
=
arg0
.
range
.
isFormula
();
}
if
(
arg0
instanceof
cError
)
{
return
this
.
value
=
arg0
;
}
return
this
.
value
=
new
cBool
(
res
);
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
...
...
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