Comments (1)
1、函数实现代码如下:
"EVALUATE": function() {
//必要参数个数错误检测
if (arguments.length < this.m[0] || arguments.length > this.m[1]) {
return formula.error.na;
}
//参数类型错误检测
for (var i = 0; i < arguments.length; i++) {
var p = formula.errorParamCheck(this.p, arguments[i], i);
if (!p[0]) {
return formula.error.v;
}
}
try {
//公式文本
var strtext = func_methods.getFirstValue(arguments[0]).toString();
if(valueIsError(strtext)){
return strtext;
}
//if (!window.luckysheet_function.ISIDCARD.f(UUserCard)) {
// return formula.error.v;
//}
//匹配简单公式,只能包含 空格 数字-+*/.()
var formulastr = /[ \d\+\*\-\/\(\)\.]+/;
var strtext2=strtext.match(formulastr)[0];
return eval(strtext2);
}
catch (e) {
var err = e;
//计算错误检测
err = formula.errorInfo(err);
return [formula.error.v, err];
}
},
2、中文语言包zh.js代码如下
// EVALUATE
{
"n": "EVALUATE",
"t": "3",
"d": "对以文字表示的一个公式或者表达式求值,并返回结果",
"a": "根据文字公式或者表达式求值。",
"m": [1, 1],
"p": [{
"name": "公式",
"example": '"56"',
"detail": "公式或表达式仅支持数字+-/.()",
"require": "m",
"repeat": "n",
"type": "rangeall"
}]
},
from luckyexcel.
Related Issues (20)
- 通过luckyexcel导入的xlsx文件,无法使用luckysheet正常显示 HOT 3
- 导入之后下拉列表丢失,查询也没有见到dataVerification字段
- transformExcelToLucky 是否可以只导出前200行数据,节省时间
- 能配置这样的表格模版吗?
- 两年过去了,导出功能还做吗
- excel template is big
- 倒入xlsx文件,打印exportJson,发现 单元格中 以单引号开头的 数据,会丢失一个单引号 HOT 1
- core.mjs:7739 ERROR Error: Ajax error for SafeValue must use HOT 1
- Property 'luckysheet' does not exist on type 'Window & typeof globalThis'. HOT 1
- excel导入不支持形状&组合
- 导出的表格行高不一致 HOT 1
- 使用luckyexcel读取1万行的excel巨慢无比,要1分钟,有用java读取excel转成json返回给luckysheet展示的案例吗
- 导入excel,excel本身存在内容,但是却无法解析出内容。 HOT 1
- excel导入不支持冻结行和列 HOT 1
- Stuck in transformExcelToLucky() when processing Excel files containing images from Node server
- Is this the right way to do Data Validation (Verification)
- 导出功能有了吗?为啥addSheet is not a function
- 支持导出图表吗
- getScreenshot方法不能截取带有图片的excel
- 导入excel时,自动换行格式丢失,需要改wrapText的判断值
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luckyexcel.