Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
76b600ee
Commit
76b600ee
authored
Dec 12, 2020
by
zhengjie
Browse files
[代码优化](v2.6):修复导出 excel 数据报错
close
https://github.com/elunez/eladmin/issues/531
parent
264b3cb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java
View file @
76b600ee
...
...
@@ -248,7 +248,8 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
SXSSFCell
currentCell
=
currentRow
.
getCell
(
columnNum
);
if
(
currentCell
.
getCellTypeEnum
()
==
CellType
.
STRING
)
{
int
length
=
currentCell
.
getStringCellValue
().
getBytes
().
length
;
if
(
columnWidth
<
length
)
{
// 如果长度大于最大值 65280,那就取 length
if
(
columnWidth
<
length
||
(
columnWidth
*
256
>
65280
))
{
columnWidth
=
length
;
}
}
...
...
Write
Preview
Supports
Markdown
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