From 2d59c3e55978bd93741dae7a8ff21cf63b9ecf25 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期三, 14 一月 2026 21:16:57 +0800
Subject: [PATCH] 修改了对应代码
---
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
index 3b53014..822c066 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
@@ -336,17 +336,22 @@
// if (Files.exists(Paths.get(imagePath))) {
// byte[] imageBytes = Files.readAllBytes(Paths.get(imagePath));
// 灏哹yte鏁扮粍杞崲鎴恑nputstream锛屼互渚挎彃鍏ュ埌Excel涓�
- ClientAnchor anchor = new HSSFClientAnchor(0, 0, 0, 100, (short) cell.getColumnIndex(), cell.getRow().getRowNum(), (short) (cell.getColumnIndex() + 5),
- cell.getRow().getRowNum() + 1);
+ ClientAnchor anchor = new HSSFClientAnchor(813, 0, 787, 71, (short) 2, 0, (short) 4,
+ 1);
+
+
+
+// ClientAnchor anchor = new HSSFClientAnchor(813, 0, 787, 71, (short) 2, 0, (short) 4,
+// 2);
// 璁剧疆閿氱偣绫诲瀷涓篗OVE_AND_RESIZE锛屼娇鍥剧墖鍙互闅忓崟鍏冩牸璋冩暣澶у皬
anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE);
// 璁$畻灞呬腑浣嶇疆
- int col1 = 3; // 涓棿鍒�
- int col2 = col1 + 2;
- anchor.setCol1(col1);
- anchor.setCol2(col2);
- anchor.setRow1(0);
- anchor.setRow2(1);
+// int col1 = 3; // 涓棿鍒�
+// int col2 = col1 + 2;
+// anchor.setCol1(col1);
+// anchor.setCol2(col2);
+// anchor.setRow1(0);
+// anchor.setRow2(1);
// anchor.set
// anchor.setHorizontallyCenter(true);
@@ -1093,10 +1098,10 @@
HSSFSheet hssfSheet = hssfWb.getSheetAt(index);
HSSFHeader header = hssfSheet.getHeader();
// 璁剧疆椤电湁瀛椾綋
- // header.setFontName("瀹嬩綋");
+ // header.setFontName("瀹嬩綋");4
// header.setFontSize((short) 10);
// 璁剧疆椤电湁鍐呭
- hssfSheet.setMargin(Sheet.HeaderMargin, 2.1);
+ hssfSheet.setMargin(Sheet.HeaderMargin, 1.34);
header.setRight("&\"瀹嬩綋,Bold\"鍏� &N 椤� 绗� &P 椤�");
}
// 濡傛灉鏄痠ndex涓�1鐨剆heet锛岃缃《绔爣棰樿
--
Gitblit v1.9.1