ERROR: 'java.io.IOException: 你的主机中的软件中止了一个已建立的连接。'
ERROR: 'java.io.IOException: 你的主机中的软件中止了一个已建立的连接。'
org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an error occurs while saving the package : The part /docProps/core.xml failed to be saved in the stream with marshaller org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@2f67d425
at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:554)
at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1505)
at org.apache.poi.ooxml.POIXMLDocument.write(POIXMLDocument.java:242)
Caused by: org.apache.poi.openxml4j.exceptions.OpenXML4JException: The part /docProps/core.xml failed to be saved in the stream with marshaller org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller@2f67d425
at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:543)
... 60 more
经过测试,单个Sheet在8300行左右或者以上就会报错,目前没有找到原因。
解决:
单个Sheet保持5000行(或者根据实际情况处理),内容分成多个Sheet保存即可。