EPPlus error reading file

前端 未结 2 622
庸人自扰
庸人自扰 2021-01-29 15:01

using code like

using OfficeOpenXml;  // namespace for the ExcelPackage assembly
…
FileInfo newFile = new FileInfo(@\"C:\\mynewfile.xlsx\"); 
using (ExcelPackag         


        
2条回答
  •  不要未来只要你来
    2021-01-29 15:19

    The problem is in the ZIP file reader (ZipInputStream). You need to add the encodings like windows-1252 manually:

    1. dotnet add package System.Text.Encoding.CodePages

    2. Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

    More info here: .NET Core doesn't know about Windows 1252, how to fix?

提交回复
热议问题