-
Notifications
You must be signed in to change notification settings - Fork 52
DocumentFormat.OpenXml.WordProcessing namespace .NET wrappers #86
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for your submission. We'll review the code, but as this is a rather large pr it will take some time to go through it all. cheers, |
…eProcessingModeValues
…uterXml -> OuterXml, GetInnerText -> InnerText, Create -> [TypeName], CreateFromOuterXml -> [TypeName]FromOuterXml
We haven't forgot this one, but we're currently looking into a larger effort to expose a few, much used, .NET libraries. OpenXML is part of that effort and there hence is quite some overlap. A little more patience, while we make sure we cover your needs and avoid duplicate functionality. |
Good to hear that this wasn't forgotten :). While I don't know how much of OpenXML functionality you are planning to expose, let me iterate through cases where we need OpenXML in our add-ons (I hope that this will give at least one partner view on what is useful OpenXML functionality in NAV and what not):
To tell you the truth, before ".NET forbidden" policy came into light we were using ClosedXML library for most cases as it is very good OpenXML wrapper that makes OpenXML more useful (for example ClosedXML has AutoFit functionality implemented and while it is not perfect it works without any need for Excel). So if you are looking into exposing OpenXML I definitely recommend to review ClosedXML approach to how OpenXML can be wrapped in a good way. Finally one more point from me - as I mentioned in a lot of cases we need to password protect documents generated from NAV, while DOCX and XLSX files can be password protected using OpenXML, it is different cases for PDF and ZIP - we used PdfSharp for PDF file protection and Ionic.Zip for ZIP file protection. Sending unprotected file to external service (AzureFunction) to add password protection seems illogical so while considering what to expose and what not please think about this as well (it is also possible to add ZIP file protection functionality and all other files just wrap in ZIP, but then at least ZIP password protection is needed). |
@JesperSchulz any news on this? We have a solution that uses openxml to create custom xml parts that we then insert into documents in content controls for updatable word documents. Before we move all that logic to azure functions or anything, it would be nice to know what the plans are for openxml integration in AL. |
@marknitek, I'm afraid we're not able to move forward with this wrapper at the moment. Priority is currently on moving to al. Once the move is completed, we can add more capabilities to the language rather than adding these kind of wrappers - at least that is the thinking. I understand that there is a rather big need for a solution such as the one suggested here, but I don't know when we'll be able to provide a solution, and what that solution looks like. I will bring up this wrapper in the one of the coming planning meetings again, but resources are currently quite booked with all sorts of important tasks related to the big move. |
In our add-on we do lots of existing Word documents modification and usually we use DocumentFormat.OpenXml library for that. I think some kind of direct OpenXml document modification is really needed in NAV. At least for us this is very important.
This commit contains wrappers for various Word document creation / modification tasks. Basically I tried to expose enough .NET classes to be able to do the following:
It is enough to create a document as complicated as described here: http://www.ludovicperrichon.com/create-a-word-document-with-openxml-and-c/
There are a few points I need to explain that might conflict with Open C/AL Library commit requirements: