ICSharpCode.SharpZipLib.Zip.ZipException: EOF in header

时间:2020-12-27 15:26:44   收藏:0   阅读:792
//异常提示: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);

 

原文:https://www.cnblogs.com/yiyanwei/p/14196664.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!