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
f7789017
Commit
f7789017
authored
Jul 27, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add TEXTJOIN formula
parent
3111bc44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
1 deletion
+75
-1
cell/model/FormulaObjects/textanddataFunctions.js
cell/model/FormulaObjects/textanddataFunctions.js
+75
-1
No files found.
cell/model/FormulaObjects/textanddataFunctions.js
View file @
f7789017
...
...
@@ -59,7 +59,7 @@
cFormulaFunctionGroup
[
'
TextAndData
'
]
=
cFormulaFunctionGroup
[
'
TextAndData
'
]
||
[];
cFormulaFunctionGroup
[
'
TextAndData
'
].
push
(
cASC
,
cBAHTTEXT
,
cCHAR
,
cCLEAN
,
cCODE
,
cCONCATENATE
,
cCONCAT
,
cDOLLAR
,
cEXACT
,
cFIND
,
cFINDB
,
cFIXED
,
cJIS
,
cLEFT
,
cLEFTB
,
cLEN
,
cLENB
,
cLOWER
,
cMID
,
cMIDB
,
cNUMBERVALUE
,
cPHONETIC
,
cPROPER
,
cREPLACE
,
cREPLACEB
,
cREPT
,
cRIGHT
,
cRIGHTB
,
cSEARCH
,
cSEARCHB
,
cSUBSTITUTE
,
cT
,
cTEXT
,
cTRIM
,
cUPPER
,
cVALUE
);
cREPLACEB
,
cREPT
,
cRIGHT
,
cRIGHTB
,
cSEARCH
,
cSEARCHB
,
cSUBSTITUTE
,
cT
,
cTEXT
,
cT
EXTJOIN
,
cT
RIM
,
cUPPER
,
cVALUE
);
cFormulaFunctionGroup
[
'
NotRealised
'
]
=
cFormulaFunctionGroup
[
'
NotRealised
'
]
||
[];
cFormulaFunctionGroup
[
'
NotRealised
'
].
push
(
cASC
,
cBAHTTEXT
,
cJIS
,
cPHONETIC
);
...
...
@@ -1789,6 +1789,80 @@
return
this
.
value
;
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cTEXTJOIN
()
{
this
.
name
=
"
TEXTJOIN
"
;
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cTEXTJOIN
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cTEXTJOIN
.
prototype
.
constructor
=
cTEXTJOIN
;
cTEXTJOIN
.
prototype
.
argumentsMin
=
3
;
cTEXTJOIN
.
prototype
.
numFormat
=
AscCommonExcel
.
cNumFormatNone
;
cTEXTJOIN
.
prototype
.
isXLFN
=
true
;
cTEXTJOIN
.
prototype
.
Calculate
=
function
(
arg
)
{
var
oArguments
=
this
.
_prepareArguments
([
arg
[
0
],
arg
[
1
]],
arguments
[
1
],
true
);
var
argClone
=
oArguments
.
args
;
argClone
[
0
]
=
argClone
[
0
].
tocString
();
argClone
[
1
]
=
argClone
[
1
].
tocBool
();
var
argError
;
if
(
argError
=
this
.
_checkErrorArg
(
argClone
))
{
return
this
.
value
=
argError
;
}
var
delimiter
=
argClone
[
0
].
toString
();
var
ignore_empty
=
argClone
[
1
].
toBool
();
var
concatString
=
function
(
string1
,
string2
){
var
res
=
string1
;
var
delimeterStr
=
string1
===
""
?
""
:
delimiter
;
if
(
""
===
string2
&&
ignore_empty
){
return
res
;
}
res
+=
delimeterStr
+
string2
;
return
res
;
};
var
arg0
=
new
cString
(
""
),
argI
;
for
(
var
i
=
2
;
i
<
this
.
argumentsCurrent
;
i
++
)
{
argI
=
arg
[
i
];
if
(
argI
instanceof
cArea
||
argI
instanceof
cArea3D
)
{
argI
.
foreach2
(
function
(
elem
)
{
arg0
=
new
cString
(
concatString
(
arg0
.
toString
(),
elem
.
toString
()));
});
}
else
{
argI
=
argI
.
tocString
();
if
(
argI
instanceof
cError
)
{
return
this
.
value
=
argI
;
}
else
if
(
argI
instanceof
cArray
)
{
argI
.
foreach
(
function
(
elem
)
{
if
(
elem
instanceof
cError
)
{
arg0
=
elem
;
return
true
;
}
arg0
=
new
cString
(
concatString
(
arg0
.
toString
(),
elem
.
toString
()));
});
if
(
arg0
instanceof
cError
)
{
return
this
.
value
=
arg0
;
}
}
else
{
arg0
=
new
cString
(
concatString
(
arg0
.
toString
(),
argI
.
toString
()));
}
}
}
return
this
.
value
=
arg0
;
};
/**
* @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