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
2e84f4d4
Commit
2e84f4d4
authored
Aug 14, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add UNICHAR formula
parent
992b47eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
1 deletion
+45
-1
cell/model/FormulaObjects/textanddataFunctions.js
cell/model/FormulaObjects/textanddataFunctions.js
+45
-1
No files found.
cell/model/FormulaObjects/textanddataFunctions.js
View file @
2e84f4d4
...
...
@@ -60,7 +60,7 @@
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
,
cTEXTJOIN
,
cTRIM
,
cUNICODE
,
cUPPER
,
cVALUE
);
cTRIM
,
cUNIC
HAR
,
cUNIC
ODE
,
cUPPER
,
cVALUE
);
cFormulaFunctionGroup
[
'
NotRealised
'
]
=
cFormulaFunctionGroup
[
'
NotRealised
'
]
||
[];
cFormulaFunctionGroup
[
'
NotRealised
'
].
push
(
cASC
,
cBAHTTEXT
,
cJIS
,
cPHONETIC
);
...
...
@@ -1913,6 +1913,50 @@
}).
replace
(
/^
\s
|
\s
$/g
,
""
))
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cUNICHAR
()
{
this
.
name
=
"
UNICHAR
"
;
this
.
value
=
null
;
this
.
argumentsCurrent
=
0
;
}
cUNICHAR
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cUNICHAR
.
prototype
.
constructor
=
cUNICHAR
;
cUNICHAR
.
prototype
.
argumentsMin
=
1
;
cUNICHAR
.
prototype
.
argumentsMax
=
1
;
cUNICHAR
.
prototype
.
isXLFN
=
true
;
cUNICHAR
.
prototype
.
Calculate
=
function
(
arg
)
{
var
oArguments
=
this
.
_prepareArguments
(
arg
,
arguments
[
1
]);
var
argClone
=
oArguments
.
args
;
argClone
[
0
]
=
argClone
[
0
].
tocNumber
();
var
argError
;
if
(
argError
=
this
.
_checkErrorArg
(
argClone
))
{
return
this
.
value
=
argError
;
}
function
_func
(
argArray
)
{
var
num
=
parseInt
(
argArray
[
0
]);
if
(
isNaN
(
num
)
||
num
<=
0
||
num
>
1114111
){
return
new
cError
(
cErrorType
.
wrong_value_type
);
}
var
res
=
String
.
fromCharCode
(
num
);
if
(
""
===
res
){
return
new
cError
(
cErrorType
.
wrong_value_type
);
}
return
new
cString
(
res
);
}
return
this
.
value
=
this
.
_findArrayInNumberArguments
(
oArguments
,
_func
,
true
);
};
/**
* @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