我的代码: InputStream inputStream =null; try { inputStream = excelFile.getInputStream(); data = EasyExcelFactory.read(inputStream, new Sheet(1, 1, clazz)); inputStream.close(); } catch (IOException e)
解析.xls 格式的文件时,报错:
com.alibaba.excel.exception.ExcelAnalysisException: File type error,io must be available markSupported,you can do like this new BufferedInputStream(new FileInputStream(\"/xxxx\"))
"
at com.alibaba.excel.analysis.ExcelAnalyserImpl.getSaxAnalyser(ExcelAnalyserImpl.java:58) ~[easyexcel-1.1.2-beta4.jar:na]
at com.alibaba.excel.analysis.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:72) ~[easyexcel-1.1.2-beta4.jar:na]
at com.alibaba.excel.analysis.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:67) ~[easyexcel-1.1.2-beta4.jar:na]
at com.alibaba.excel.ExcelReader.read(ExcelReader.java:112) ~[easyexcel-1.1.2-beta4.jar:na]
at com.alibaba.excel.EasyExcelFactory.read(EasyExcelFactory.java:38) ~[easyexcel-1.1.2-beta4.jar:na]
at com.sf.tcmp.util.ExcelUtil.readExcelFile(ExcelUtil.java:45) ~[tcmp-common-1.0.0.jar:na]