Skip to content

Commit

Permalink
fixup! feat: support reading multiple Excel sheets at once
Browse files Browse the repository at this point in the history
Type name parameter is optional for multi-sheet loading.

ING-4062
  • Loading branch information
stempler committed Nov 8, 2023
1 parent bf6d7d8 commit 7e35a00
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ else if (skipType) {
// writer
String typeNames = reader.getParameter(CommonSchemaConstants.PARAM_TYPENAME)
.as(String.class);
String[] typeNamesParts = typeNames.split(",");
for (int i = 0; i < typeNamesParts.length && i < sheets.size(); i++) {
QName typeName = QName.valueOf(typeNamesParts[i]);
sheets.get(i).getSettings().setTypeName(typeName);
if (typeNames != null) {
String[] typeNamesParts = typeNames.split(",");
for (int i = 0; i < typeNamesParts.length && i < sheets.size(); i++) {
QName typeName = QName.valueOf(typeNamesParts[i]);
sheets.get(i).getSettings().setTypeName(typeName);
}
}
}
else {
Expand Down

0 comments on commit 7e35a00

Please sign in to comment.