|
|
|
@ -22,7 +22,7 @@ public class BofRecordHandler extends AbstractXlsRecordHandler {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void processRecord(XlsReadContext xlsReadContext, Record record) { |
|
|
|
|
BOFRecord br = (BOFRecord)record; |
|
|
|
|
BOFRecord br = (BOFRecord) record; |
|
|
|
|
XlsReadWorkbookHolder xlsReadWorkbookHolder = xlsReadContext.xlsReadWorkbookHolder(); |
|
|
|
|
if (br.getType() == BOFRecord.TYPE_WORKBOOK) { |
|
|
|
|
xlsReadWorkbookHolder.setReadSheetIndex(null); |
|
|
|
@ -38,14 +38,15 @@ public class BofRecordHandler extends AbstractXlsRecordHandler {
|
|
|
|
|
readSheetIndex = 0; |
|
|
|
|
xlsReadWorkbookHolder.setReadSheetIndex(readSheetIndex); |
|
|
|
|
} |
|
|
|
|
ReadSheet readSheet = xlsReadWorkbookHolder.getActualSheetDataList().get(readSheetIndex); |
|
|
|
|
assert readSheet != null : "Can't find the sheet."; |
|
|
|
|
ReadSheet actualReadSheet = xlsReadWorkbookHolder.getActualSheetDataList().get(readSheetIndex); |
|
|
|
|
assert actualReadSheet != null : "Can't find the sheet."; |
|
|
|
|
// Copy the parameter to the current sheet
|
|
|
|
|
readSheet = SheetUtils.match(readSheet, xlsReadContext); |
|
|
|
|
ReadSheet readSheet = SheetUtils.match(actualReadSheet, xlsReadContext); |
|
|
|
|
if (readSheet != null) { |
|
|
|
|
xlsReadContext.currentSheet(readSheet); |
|
|
|
|
xlsReadContext.xlsReadSheetHolder().setIgnoreRecord(Boolean.FALSE); |
|
|
|
|
} else { |
|
|
|
|
xlsReadContext.currentSheet(actualReadSheet); |
|
|
|
|
xlsReadContext.xlsReadSheetHolder().setIgnoreRecord(Boolean.TRUE); |
|
|
|
|
} |
|
|
|
|
// Go read the next one
|
|
|
|
|