Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
31cb0e53
Commit
31cb0e53
authored
Jun 02, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复Excel文件下载
parent
81f94227
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
ExcelHttp.java
.../src/main/java/com/yanzuoguang/cloud/excel/ExcelHttp.java
+4
-3
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/excel/ExcelHttp.java
View file @
31cb0e53
...
...
@@ -56,11 +56,12 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
* @param downFileName 下载文件名
*/
public
boolean
down
(
HttpServletResponse
response
,
String
downFileName
)
throws
IOException
{
ExportData
config
=
this
.
getConfig
();
if
(
StringHelper
.
isEmpty
(
downFileName
))
{
downFileName
=
this
.
getConfig
()
.
getDownFileName
();
downFileName
=
config
.
getDownFileName
();
}
if
(
StringHelper
.
isEmpty
(
downFileName
))
{
downFileName
=
this
.
getConfig
()
.
getFileName
();
downFileName
=
config
.
getFileName
();
}
// 正式文件
String
fileName
=
this
.
getFileName
();
...
...
@@ -80,7 +81,7 @@ public class ExcelHttp<T extends Object> extends ExcelConsole<T> {
// 返回文件名和生成的文件大小
// 假如连续1分钟返回文件大小为0,则说明性能存在问题,或者是其他线程已经删除文件
ExportTempRes
res
=
new
ExportTempRes
();
res
.
setFileName
(
fileName
);
res
.
setFileName
(
config
.
getFileName
()
);
res
.
setSize
(
fileTemp
.
length
());
res
.
setRow
(
StringHelper
.
toLong
(
FileHelper
.
readFile
(
fileRow
,
"utf-8"
)));
// 输出结果
...
...
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