提交 9623c15d authored 作者: taojinlong's avatar taojinlong

fix: 解析excel失败

上级 19d08770
...@@ -19,8 +19,6 @@ import org.xml.sax.helpers.XMLReaderFactory; ...@@ -19,8 +19,6 @@ import org.xml.sax.helpers.XMLReaderFactory;
import java.io.InputStream; import java.io.InputStream;
import java.util.*; import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/** /**
* @author y * @author y
...@@ -251,9 +249,11 @@ public class ExcelXlsxReader extends DefaultHandler { ...@@ -251,9 +249,11 @@ public class ExcelXlsxReader extends DefaultHandler {
String value = this.getDataValue(lastIndex.trim(), "");//根据索引值获取对应的单元格值 String value = this.getDataValue(lastIndex.trim(), "");//根据索引值获取对应的单元格值
if (preRef == null) { if (preRef == null) {
preRef = "A" + curRow; preRef = "A" + curRow;
if(!preRef.equalsIgnoreCase(ref)){
cellList.add(curCol, ""); cellList.add(curCol, "");
curCol++; curCol++;
} }
}
//补全单元格之间的空单元格 //补全单元格之间的空单元格
if (!"A".equals(preRef.substring(0, 1)) && curRow==1 && preRef.equalsIgnoreCase(ref)) { if (!"A".equals(preRef.substring(0, 1)) && curRow==1 && preRef.equalsIgnoreCase(ref)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论