Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
162ac4d6
提交
162ac4d6
authored
7月 01, 2021
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: Excel支持公式;错误提示增加文档链接
上级
fbba1e66
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
35 行增加
和
3 行删除
+35
-3
DataSetTableService.java
...java/io/dataease/service/dataset/DataSetTableService.java
+32
-0
en.js
frontend/src/lang/en.js
+1
-1
tw.js
frontend/src/lang/tw.js
+1
-1
zh.js
frontend/src/lang/zh.js
+1
-1
没有找到文件。
backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java
浏览文件 @
162ac4d6
...
...
@@ -975,6 +975,38 @@ public class DataSetTableService {
return
""
;
}
CellType
cellTypeEnum
=
cell
.
getCellTypeEnum
();
if
(
cellTypeEnum
.
equals
(
CellType
.
FORMULA
))
{
try
{
double
d
=
cell
.
getNumericCellValue
();
try
{
Double
value
=
new
Double
(
d
);
double
eps
=
1
e
-
10
;
if
(
value
-
Math
.
floor
(
value
)
<
eps
)
{
if
(
cellType
)
{
tableFiled
.
setFieldType
(
"LONG"
);
}
return
value
.
longValue
()
+
""
;
}
else
{
if
(
cellType
)
{
tableFiled
.
setFieldType
(
"DOUBLE"
);
}
NumberFormat
nf
=
NumberFormat
.
getInstance
();
nf
.
setGroupingUsed
(
false
);
return
nf
.
format
(
value
);
}
}
catch
(
Exception
e
)
{
BigDecimal
b
=
new
BigDecimal
(
d
);
return
b
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()
+
""
;
}
}
catch
(
IllegalStateException
e
)
{
String
s
=
String
.
valueOf
(
cell
.
getRichStringCellValue
());
if
(
cellType
)
{
tableFiled
.
setFieldType
(
"TEXT"
);
tableFiled
.
setFieldSize
(
65533
);
}
return
s
;
}
}
if
(
cellTypeEnum
.
equals
(
CellType
.
STRING
))
{
if
(
cellType
)
{
tableFiled
.
setFieldType
(
"TEXT"
);
...
...
frontend/src/lang/en.js
浏览文件 @
162ac4d6
...
...
@@ -848,7 +848,7 @@ export default {
edit_field
:
'Edit Field'
,
preview_100_data
:
'Show 100 lines data'
,
invalid_table_check
:
'Please sync data first.'
,
parse_error
:
'Parse Error,please check'
,
parse_error
:
'Parse Error,please check
.Reference:https://dataease.io/docs/faq/dataset_faq/
'
,
origin_field_type
:
'Origin Type'
,
edit_excel_table
:
'Edit Excel Dataset'
,
edit_excel
:
'Edit Excel'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
162ac4d6
...
...
@@ -890,7 +890,7 @@ export default {
edit_field
:
'編輯自斷'
,
preview_100_data
:
'顯示前100行數據'
,
invalid_table_check
:
'非直連數據集請先完成數據同步'
,
parse_error
:
'Excel解析錯誤,請檢查格式、字段等信息'
,
parse_error
:
'Excel解析錯誤,請檢查格式、字段等信息
。具體參考:https://dataease.io/docs/faq/dataset_faq/
'
,
origin_field_type
:
'原始類型'
,
edit_excel_table
:
'編輯Excel數據集'
,
edit_excel
:
'編輯Excel'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
162ac4d6
...
...
@@ -848,7 +848,7 @@ export default {
edit_field
:
'编辑字段'
,
preview_100_data
:
'显示前100行数据'
,
invalid_table_check
:
'非直连数据集请先完成数据同步'
,
parse_error
:
'Excel解析错误,请检查格式、字段等信息'
,
parse_error
:
'Excel解析错误,请检查格式、字段等信息
。具体参考:https://dataease.io/docs/faq/dataset_faq/
'
,
origin_field_type
:
'原始类型'
,
edit_excel_table
:
'编辑Excel数据集'
,
edit_excel
:
'编辑Excel'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论