We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jeecgboot版本: 3.5.3
描述:importExcelBySax方法中ImportParams 为null,readExcel方法不支持ImportParams 为null
报错位置行:params.getSheetNum()
public static List importExcelBySax(InputStream inputstream, ISaxRowRead rowRead) { return new SaxReadExcel().readExcel(inputstream, null, null, rowRead, null); }
private <T> List<T> readExcel(OPCPackage opcPackage, Class<?> pojoClass, ImportParams params, ISaxRowRead rowRead, IExcelReadRowHanlder hanlder) { try { XSSFReader xssfReader = new XSSFReader(opcPackage); SharedStringsTable sst = xssfReader.getSharedStringsTable(); if (rowRead == null) { rowRead = new SaxRowRead(pojoClass, params, hanlder); } XMLReader parser = fetchSheetParser(sst, rowRead); Iterator<InputStream> sheets = xssfReader.getSheetsData(); int sheetIndex = 0; while (sheets.hasNext() && sheetIndex < params.getSheetNum()) { sheetIndex++; InputStream sheet = sheets.next(); InputSource sheetSource = new InputSource(sheet); parser.parse(sheetSource); sheet.close(); } return rowRead.getList(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); throw new ExcelImportException("SAX导入数据失败"); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
jeecgboot版本: 3.5.3
描述:importExcelBySax方法中ImportParams 为null,readExcel方法不支持ImportParams 为null
报错位置行:params.getSheetNum()
public static List importExcelBySax(InputStream inputstream, ISaxRowRead rowRead) {
return new SaxReadExcel().readExcel(inputstream, null, null, rowRead, null);
}
The text was updated successfully, but these errors were encountered: