Java Code Examples for com.alibaba.excel.read.metadata.ReadSheet#getSheetNo()
The following examples show how to use
com.alibaba.excel.read.metadata.ReadSheet#getSheetNo() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExcelReader.java From easyexcel with Apache License 2.0 | 5 votes |
/** * Parse the workBook get all sheets * * @return workBook all sheets * * @deprecated please use {@link #excelExecutor()} */ @Deprecated public List<Sheet> getSheets() { List<ReadSheet> sheetList = excelExecutor().sheetList(); List<Sheet> sheets = new ArrayList<Sheet>(); if (sheetList == null || sheetList.isEmpty()) { return sheets; } for (ReadSheet readSheet : sheetList) { Sheet sheet = new Sheet(readSheet.getSheetNo() + 1); sheet.setSheetName(readSheet.getSheetName()); sheets.add(sheet); } return sheets; }
Example 2
Source File: ReadSheetHolder.java From easyexcel with Apache License 2.0 | 5 votes |
public ReadSheetHolder(ReadSheet readSheet, ReadWorkbookHolder readWorkbookHolder) { super(readSheet, readWorkbookHolder, readWorkbookHolder.getReadWorkbook().getConvertAllFiled()); this.readSheet = readSheet; this.parentReadWorkbookHolder = readWorkbookHolder; this.sheetNo = readSheet.getSheetNo(); this.sheetName = readSheet.getSheetName(); this.cellMap = new LinkedHashMap<Integer, Cell>(); this.rowIndex = -1; }