11-22-2023 10:31 AM
Hi,
has any one used DocumentFormat.OpenXml.dll coming v8 to create excel docs?
It looks like it is working from standard extender BR once you add reference to DocumentFormat.OpenXml.dll and System.IO.Packaging.dll but it does not work when you do in a file within Workspace assembly as it complains about not finding the referenced System.IO.Packaging.dll even if the dependency is added
Thanks
11-22-2023 12:24 PM
Hey Francisco
Is this specifically an issue that you have noticed following an upgrade to v8?
We're on 7.3.1 and I have used it successfully. But I did need to add the following to Referenced Assemblies in the Business Rule Properties:
C:\Program Files\OneStream Software\OneStreamAppRoot\OneStreamApp\bin\DocumentFormat.OpenXml.dll; C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll
Hope this helps... But if not, I'm keen to see how this gets resolved as it will become an issue for us when we upgrade.
Mark
11-23-2023 02:39 AM
It's a new v8 deployment.
DocumentFormat.OpenXml.dll for .NET Core has now a dependency on System.IO.Packaging.dll. When creating an excel file it uses class Package in assembly System.IO.Packaging.dll
We can compile an Extender BR and create an empty excel.
but if we try to put same in an assembly:
Ot we are missing something or different versions of DocumentFormat.OpenXml.dll used by assemblies and Extender BR or assembly compiles in sequential order and does not compile in memory the dependencies first or....
Thanks!
Your additional imports:
11-23-2023 02:51 AM
Workaround so far is to have the excel creation in the extender BR and import the extender br as dependency in the Assembly. then it works. We can call the extender br method from a class in the assembly and the excel gets created...