Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
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
hlcm
leaf-hlcm
Commits
172fae59
Commit
172fae59
authored
Mar 16, 2021
by
李贺贺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对账单打印格式优化
parent
83d6fe57
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
37 deletions
+57
-37
ConExportServiceImpl.java
...hand/hls/hlcm/cont/service/impl/ConExportServiceImpl.java
+52
-32
ExcelFormatUtil.java
...ain/java/com/hand/hls/hlcm/cont/util/ExcelFormatUtil.java
+5
-5
No files found.
src/main/java/com/hand/hls/hlcm/cont/service/impl/ConExportServiceImpl.java
View file @
172fae59
This diff is collapsed.
Click to expand it.
src/main/java/com/hand/hls/hlcm/cont/util/ExcelFormatUtil.java
View file @
172fae59
...
...
@@ -61,7 +61,7 @@ public class ExcelFormatUtil {
Font
font1
=
wb
.
createFont
();
font1
.
setFontName
(
"黑体"
);
style1
.
setFont
(
font1
);
//
style1.setWrapText(true);
style1
.
setWrapText
(
true
);
style1
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
style1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
return
style1
;
...
...
@@ -117,7 +117,7 @@ public class ExcelFormatUtil {
//设置每一列的字段名
cell
.
setCellValue
(
title
);
cell
.
setCellStyle
(
header
);
CellRangeAddress
region
=
new
CellRangeAddress
(
firstRow
,
firstRow
+
1
,
firstrCol
,
9
);
CellRangeAddress
region
=
new
CellRangeAddress
(
firstRow
,
firstRow
+
1
,
firstrCol
,
7
);
sheet
.
addMergedRegion
(
region
);
}
...
...
@@ -130,7 +130,7 @@ public class ExcelFormatUtil {
//设置每一列的字段名
cell
.
setCellValue
(
content
);
cell
.
setCellStyle
(
contentType
);
CellRangeAddress
region
=
new
CellRangeAddress
(
firstRow
,
firstRow
,
firstrCol
,
9
);
CellRangeAddress
region
=
new
CellRangeAddress
(
firstRow
,
firstRow
,
firstrCol
,
7
);
//删除最后一列
sheet
.
addMergedRegion
(
region
);
}
...
...
@@ -139,11 +139,11 @@ public class ExcelFormatUtil {
SXSSFRow
row
=
sheet
.
createRow
(
firstRow
);
for
(
int
j
=
1
;
j
<=
title
.
length
;
j
++)
{
SXSSFCell
cell
=
row
.
createCell
(
j
);
SXSSFCell
cell
=
row
.
createCell
(
j
-
1
);
//设置每一列的字段名
cell
.
setCellValue
(
title
[
j
-
1
]);
cell
.
setCellStyle
(
contentTable
);
sheet
.
setColumnWidth
(
j
,
titleLength
[
j
-
1
]);
sheet
.
setColumnWidth
(
j
-
1
,
titleLength
[
j
-
1
]);
}
}
...
...
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