From 3e438e35ad87ca4e18c587fc25302fc203d3f83d Mon Sep 17 00:00:00 2001
From: TomXin <766781886@qq.com>
Date: Wed, 10 Jul 2024 17:51:14 +0800
Subject: [PATCH] Fix issue #445
---
.../main/java/org/dhatim/fastexcel/Table.java | 30 ++++++++++---------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/fastexcel-writer/src/main/java/org/dhatim/fastexcel/Table.java b/fastexcel-writer/src/main/java/org/dhatim/fastexcel/Table.java
index 0859a953..5c269994 100644
--- a/fastexcel-writer/src/main/java/org/dhatim/fastexcel/Table.java
+++ b/fastexcel-writer/src/main/java/org/dhatim/fastexcel/Table.java
@@ -2,13 +2,13 @@
import java.io.IOException;
-public class Table{
+public class Table {
int index;
- private String name ;
+ private String name;
private String displayName;
private boolean totalsRowShown = false;
- private Range range;
- private String[] headers ;
+ private final Range range;
+ private final String[] headers;
private final TableStyleInfo styleInfo = new TableStyleInfo(this);
@@ -46,10 +46,12 @@ public TableStyleInfo styleInfo() {
public class TableStyleInfo {
private final Table table;
- TableStyleInfo(Table table){
+
+ TableStyleInfo(Table table) {
this.table = table;
}
- private String name ;
+
+ private String name;
private boolean showFirstColumn = false;
private boolean showLastColumn = false;
private boolean showRowStripes = true;
@@ -81,11 +83,11 @@ public TableStyleInfo setShowColumnStripes(boolean showColumnStripes) {
}
public void write(Writer w) throws IOException {
- w.append("