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
e9b0149e
Commit
e9b0149e
authored
Aug 11, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add SHEETS formula(+ modify sheet formula)
parent
d2585d39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
3 deletions
+47
-3
cell/model/FormulaObjects/informationFunctions.js
cell/model/FormulaObjects/informationFunctions.js
+47
-3
No files found.
cell/model/FormulaObjects/informationFunctions.js
View file @
e9b0149e
...
...
@@ -52,8 +52,8 @@
var
cElementType
=
AscCommonExcel
.
cElementType
;
cFormulaFunctionGroup
[
'
Information
'
]
=
cFormulaFunctionGroup
[
'
Information
'
]
||
[];
cFormulaFunctionGroup
[
'
Information
'
].
push
(
cERROR_TYPE
,
cISBLANK
,
cISERR
,
cISERROR
,
cISEVEN
,
cISFORMULA
,
cISLOGICAL
,
cISNA
,
cISN
ONTEXT
,
cISNUMBER
,
cISODD
,
cISREF
,
cISTEXT
,
cN
,
cNA
,
cSHEET
,
cTYPE
);
cFormulaFunctionGroup
[
'
Information
'
].
push
(
cERROR_TYPE
,
cISBLANK
,
cISERR
,
cISERROR
,
cISEVEN
,
cISFORMULA
,
cISLOGICAL
,
cISN
A
,
cISNONTEXT
,
cISNUMBER
,
cISODD
,
cISREF
,
cISTEXT
,
cN
,
cNA
,
cSHEET
,
cSHEETS
,
cTYPE
);
/**
* @constructor
...
...
@@ -573,7 +573,51 @@
if
(
cElementType
.
error
===
arg0
.
type
){
res
=
arg0
;
}
else
{
res
=
new
cNumber
(
arg
[
0
].
ws
.
nSheetId
);
if
(
arg0
.
ws
){
res
=
new
cNumber
(
arg0
.
ws
.
nSheetId
);
}
else
if
(
arg0
.
wsFrom
){
var
sheet1
=
arg0
.
wsFrom
.
index
;
var
sheet2
=
arg0
.
wsTo
.
index
;
res
=
new
cNumber
(
Math
.
min
(
sheet1
,
sheet2
));
}
}
}
return
this
.
value
=
res
;
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cSHEETS
()
{
this
.
name
=
"
SHEETS
"
;
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cSHEETS
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cSHEETS
.
prototype
.
constructor
=
cSHEETS
;
cSHEETS
.
prototype
.
argumentsMin
=
0
;
cSHEETS
.
prototype
.
argumentsMax
=
1
;
cSHEETS
.
prototype
.
isXLFN
=
true
;
cSHEETS
.
prototype
.
Calculate
=
function
(
arg
,
opt_bbox
,
opt_defName
,
ws
)
{
var
res
;
if
(
0
===
arg
.
length
){
res
=
new
cNumber
(
ws
.
workbook
.
aWorksheets
.
length
);
}
else
{
var
arg0
=
arg
[
0
];
if
(
cElementType
.
error
===
arg0
.
type
){
res
=
arg0
;
}
else
if
(
cElementType
.
cellsRange
===
arg0
.
type
||
cElementType
.
cell
===
arg0
.
type
||
cElementType
.
cell3D
===
arg0
.
type
){
res
=
new
cNumber
(
1
);
}
else
if
(
cElementType
.
cellsRange3D
===
arg0
.
type
){
var
sheet1
=
arg0
.
wsFrom
.
index
;
var
sheet2
=
arg0
.
wsTo
.
index
;
res
=
new
cNumber
(
Math
.
abs
(
sheet2
-
sheet1
)
+
1
);
}
else
{
res
=
new
cError
(
cErrorType
.
not_available
);
}
}
return
this
.
value
=
res
;
...
...
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