Anyone was able to use DocumentFormat.OpenXml.dll from Workspace assembly (v8)?

franciscoamores
Contributor II

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

 

3 REPLIES 3

MarkBird
Contributor II

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

 

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.

franciscoamores_1-1700724755936.png

but if we try to put same in an assembly:

franciscoamores_2-1700724974577.png

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:

franciscoamores_0-1700724679595.png

 

 

 

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...