//异常提示: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);