Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
8fdb11b4
Commit
8fdb11b4
authored
Nov 01, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出
parent
c9804c07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
FileHelper.java
...ava/com/yeejoin/amos/patrol/business/util/FileHelper.java
+2
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/FileHelper.java
View file @
8fdb11b4
...
...
@@ -1146,15 +1146,14 @@ private static void defaultExport(List<Map<String, Object>> list, String fileNam
if
(
dlData
==
null
){
continue
;
}
if
(
dlData
.
length
<
5
){
//255以内的下拉
}
if
(
dlData
.
length
<
5
){
//255以内的下拉
//255以内的下拉,参数分别是:作用的sheet、下拉内容数组、起始行、终止行、起始列、终止列
sheet1
.
addValidationData
(
setDataValidation
(
sheet1
,
dlData
,
1
,
30000
,
rownum
,
rownum
));
//超过255个报错
}
else
{
//255以上的下拉,即下拉列表元素很多的情况
//1、设置有效性
//String strFormula = "Sheet2!$A$1:$A$5000" ; //Sheet2第A1到A5000作为下拉列表来源数据
String
strFormula
=
"Sheet2!$"
+
arr
[
index
]+
"$1:$"
+
arr
[
index
]+
"$
5000"
;
//Sheet2第A1到A5000作为下拉列表来源数据
String
strFormula
=
"Sheet2!$"
+
arr
[
index
]+
"$1:$"
+
arr
[
index
]+
"$
"
+
dlData
.
length
;
//Sheet2第A1到A5000作为下拉列表来源数据
sheet2
.
setColumnWidth
(
r
,
4000
);
//设置每列的列宽
//设置数据有效性加载在哪个单元格上,参数分别是:从sheet2获取A1到A5000作为一个下拉的数据、起始行、终止行、起始列、终止列
sheet1
.
addValidationData
(
SetDataValidation
(
strFormula
,
1
,
30000
,
rownum
,
rownum
));
//下拉列表元素很多的情况
...
...
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