128
Views
1
Comments
[OfficeUtils] Having error on Excel_Export_GenerateFile
Question
officeutils
Service icon
Forge asset by Bruno Gonçalves

When I try to generate a report,It keeps on having this error.


Attempt by security transparent method 'NPOI.OpenXml4Net.OPC.ZipPackage..ctor(System.IO.Stream, NPOI.OpenXml4Net.OPC.PackageAccess)'
to access security critical method 'ICSharpCode.SharpZipLib.Zip.ZipInputStream..ctor(System.IO.Stream)' failed. Assembly 'NPOI.OpenXml4Net,
Version=2.2.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the
level 2 security transparency model.Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default,
which may be the cause of this exception.

2016-10-14 14-44-44
Elena Novozhilova

Hi Patrick Robles,

I believe that your error is related with the library version of SharpZipLib.

On the OutSystems Platform Server version 11.7.2 it has been upgraded.

So if your server version is lower then 11.7.2 you should use OfficeUtils version 4.0.1.

If it is 11.7.2 or higher you should use OfficeUtils version 5.0.


Best regards,

Elena 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.