OpenXml in ABL - Forum - OpenEdge Development - Progress Community
 Forum

OpenXml in ABL

This question is not answered

Hi,

The needs of a project, brought me to use openXMl library. Basically, i'd like to create a new Word Document (docm) in which I inject body and macros from another document.

I'm stuck in this task because of ABL restrictions. ABL doesn't support generic collections and then some .NET methods are not accessible.

Like for example the method that adds a new part to a document.

VbaProjectPart vbaProjectPart1 = mainPart.AddNewPart<VbaProjectPart>("rId9"); // C# code

Is there a workaround in ABL or should I go for an external solution (C# dll) ? 

Best regards.

All Replies
  • Yes, use an external solution.  In general OpenEdge ABL doesn't do a great job with XML, let alone Office formats.

    You could interact with a dll or out-of-process code (via SOAP or REST).

    On Windows there is something in OpenEdge ABL called the "CLR bridge" that would allow you to interact with a .Net-framework-appdomain within the same process as your ABL code.  You can even load arbitrary .Net assemblies (eg. one of your creation).  Before using any .Net interface you would want to ensure that the .Net interface is relatively simple (no generics, delegates, events, etc).