异常代码 EasyExcel.write(response.getOutputStream(), MonthDetailData.class).sheet(fileName).doWrite(dataList); 异常信息 com.alibaba.excel.exception.ExcelGenerateException: Can not close IO at com.alibaba.excel.context.WriteContextImpl.throwCanNotCloseIo(WriteContextImpl.java:390) ~[easyexcel-2.0.0-beta3.jar:na] at com.alibaba.excel.context.WriteContextImpl.finish(WriteContextImpl.java:352) ~[easyexcel-2.0.0-beta3.jar:na] at com.alibaba.excel.write.ExcelBuilderImpl.finish(ExcelBuilderImpl.java:105) ~[easyexcel-2.0.0-beta3.jar:na] at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:97) ~[easyexcel-2.0.0-beta3.jar:na] at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:154) ~[easyexcel-2.0.0-beta3.jar:na] at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:139) ~[easyexcel-2.0.0-beta3.jar:na] at com.alibaba.excel.write.builder.ExcelWriterSheetBuilder.doWrite(ExcelWriterSheetBuilder.java:134) ~[easyexcel-2.0.0-beta3.jar:na]
[alibaba/easyexcel]ExcelGenerateException Can not close IO,是由于数据过大造成的么,我一次导出10万数据,还是说也有65536的限制
回答
异常 贴全
您好 是否已经解决了问题?如果没解决 请重新打开问题。并提供完整异常。
{ "className": "com.alibaba.excel.exception.ExcelGenerateException", "message": "Can not close IO.", "cause": { "localizedMessage": "java.io.IOException: Broken pipe", "@type": "org.apache.catalina.connector.ClientAbortException", "message": "java.io.IOException: Broken pipe", "stackTrace": [ { "methodName": "realWriteBytes", "lineNumber": 356, "fileName": "OutputBuffer.java", "nativeMethod": false, "className": "org.apache.catalina.connector.OutputBuffer" }, { "methodName": "flushByteBuffer", "lineNumber": 825, "fileName": "OutputBuffer.java", "nativeMethod": false, "className": "org.apache.catalina.connector.OutputBuffer" }, { "methodName": "doFlush", "lineNumber": 310, "fileName": "OutputBuffer.java", "nativeMethod": false, "className": "org.apache.catalina.connector.OutputBuffer" }, { "methodName": "close", "lineNumber": 263, "fileName": "OutputBuffer.java", "nativeMethod": false, "className": "org.apache.catalina.connector.OutputBuffer" }, { "methodName": "close", "lineNumber": 157, "fileName": "CoyoteOutputStream.java", "nativeMethod": false, "className": "org.apache.catalina.connector.CoyoteOutputStream" }, { "methodName": "finish", "lineNumber": 306, "fileName": "WriteContextImpl.java", "nativeMethod": false, "className": "com.alibaba.excel.context.WriteContextImpl" }, { "methodName": "finish", "lineNumber": 101, "fileName": "ExcelBuilderImpl.java", "nativeMethod": false, "className": "com.alibaba.excel.write.ExcelBuilderImpl" }, { "methodName": "finish", "lineNumber": 328, "fileName": "ExcelWriter.java", "nativeMethod": false, "className": "com.alibaba.excel.ExcelWriter" }, { "methodName": "doWrite", "lineNumber": 191, "fileName": "ExcelWriterSheetBuilder.java", "nativeMethod": false, "className": "com.alibaba.excel.write.builder.ExcelWriterSheetBuilder" }, 遇到相同的问题,有时候可以,有时候会报错,数据有3万条左右,excel大小5M左右