其他分享
首页 > 其他分享> > ICSharpCode.SharpZipLib.Zip.ZipException: EOF in header

ICSharpCode.SharpZipLib.Zip.ZipException: EOF in header

作者:互联网

//异常提示:ICSharpCode.SharpZipLib.Zip.ZipException: EOF in header 

NPOIMemoryStream stream = new NPOIMemoryStream();
using (var fileStream = File.Open(filePath, FileMode.Open, FileAccess.ReadWrite))
{
    fileStream.CopyTo(stream);
    stream.Position = 0; //这一句不加就会上面的异常错误
}
IWorkbook wk = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);

 

标签:ZipException,EOF,stream,Zip,NPOIMemoryStream,header,SharpZipLib
来源: https://www.cnblogs.com/yiyanwei/p/14196664.html