Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit 66c29c5

Browse files
authored
Merge pull request #11 from ydq/master
🐛 fix xlsx SAX parse row number bug
2 parents 032c440 + 6b4e8e4 commit 66c29c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/io/github/biezhi/excel/plus/handler/Excel2007Handler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ public void startElement(String uri, String localName, String name, Attributes a
197197
// set cell type
198198
this.setNextDataType(attributes);
199199
}
200-
200+
if("row".equals(name)) {
201+
curRow = Integer.parseInt(attributes.getValue("r"));
202+
}
201203
// when the element is t
202204
isTElement = "t".equals(name);
203205
lastContents = "";
@@ -338,7 +340,6 @@ public void endElement(String uri, String localName, String name) {
338340
data.add(pair);
339341
}
340342
rows.clear();
341-
curRow++;
342343
curCol = 0;
343344
preRef = null;
344345
ref = null;

0 commit comments

Comments
 (0)