use of com.alibaba.excel.read.metadata.holder.csv.CsvReadSheetHolder in project easyexcel by alibaba.
the class AnalysisContextImpl method currentSheet.
@Override
public void currentSheet(ReadSheet readSheet) {
switch(readWorkbookHolder.getExcelType()) {
case XLS:
readSheetHolder = new XlsReadSheetHolder(readSheet, readWorkbookHolder);
break;
case XLSX:
readSheetHolder = new XlsxReadSheetHolder(readSheet, readWorkbookHolder);
break;
case CSV:
readSheetHolder = new CsvReadSheetHolder(readSheet, readWorkbookHolder);
break;
default:
break;
}
currentReadHolder = readSheetHolder;
if (readWorkbookHolder.getHasReadSheet().contains(readSheetHolder.getSheetNo())) {
throw new ExcelAnalysisException("Cannot read sheet repeatedly.");
}
readWorkbookHolder.getHasReadSheet().add(readSheetHolder.getSheetNo());
if (log.isDebugEnabled()) {
log.debug("Began to read:{}", readSheetHolder);
}
}
Aggregations