|
|
@ -146,19 +146,21 @@ public class ExcelWriteHeadProperty extends ExcelHeadProperty { |
|
|
|
int lastCol = i; |
|
|
|
int lastCol = i; |
|
|
|
int lastRow = j; |
|
|
|
int lastRow = j; |
|
|
|
for (int k = i + 1; k < headList.size(); k++) { |
|
|
|
for (int k = i + 1; k < headList.size(); k++) { |
|
|
|
boolean flag = (j - 1 >= 0) && !headList.get(k).getHeadNameList().get(j - 1).equals(headName); |
|
|
|
String key = k + "-" + j; |
|
|
|
if (headList.get(k).getHeadNameList().get(j).equals(headName) && flag) { |
|
|
|
if (headList.get(k).getHeadNameList().get(j).equals(headName) && !alreadyRangeSet.contains(key)) { |
|
|
|
alreadyRangeSet.add(k + "-" + j); |
|
|
|
alreadyRangeSet.add(key); |
|
|
|
lastCol = k; |
|
|
|
lastCol = k; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Set<String> tempAlreadyRangeSet = new HashSet<String>(); |
|
|
|
Set<String> tempAlreadyRangeSet = new HashSet<>(); |
|
|
|
outer: |
|
|
|
outer: |
|
|
|
for (int k = j + 1; k < headNameList.size(); k++) { |
|
|
|
for (int k = j + 1; k < headNameList.size(); k++) { |
|
|
|
for (int l = i; l <= lastCol; l++) { |
|
|
|
for (int l = i; l <= lastCol; l++) { |
|
|
|
if (headList.get(l).getHeadNameList().get(k).equals(headName)) { |
|
|
|
String key = l + "-" + k; |
|
|
|
|
|
|
|
if (headList.get(l).getHeadNameList().get(k).equals(headName) && !alreadyRangeSet.contains( |
|
|
|
|
|
|
|
key)) { |
|
|
|
tempAlreadyRangeSet.add(l + "-" + k); |
|
|
|
tempAlreadyRangeSet.add(l + "-" + k); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
break outer; |
|
|
|
break outer; |
|
|
|