EPPlus error reading file

两盒软妹~` 提交于 2019-12-02 13:35:30

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?

if your project is .net core edit your project file then add

<ItemGroup>
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" />
</ItemGroup>

and in your startup.cs

add

System.Text.Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!