With the .NET5 release further development of some projects was questionable due to the complexity of porting. One can abandon small outdated librarie

Tutorial: how to port a project from Interop Word API to Open XML SDK

submited by
Style Pass
2021-08-20 13:00:10

With the .NET5 release further development of some projects was questionable due to the complexity of porting. One can abandon small outdated libraries or find a replacement. But it's hard to throw away Microsoft.Office.Interop.Word.dll. Microsoft doesn't plan to add compatibility with .NET Core/5+, so in this article we focus on creating Word files with Open XML SDK.

Office Open XML aka OpenXML or OOXML, is an XML-based format for office documents. It includes text files, spreadsheets, presentations, as well as diagrams, shapes, and other graphic material. In June 2014 Microsoft released Open XML SDK source code on GitHub to work with this format.

But the open source code was the big plus. If we had COM libraries' open source code, the developer community would help with porting to .NET Core/5+. Besides attracting third-party developers, open source code allows everyone to find and fix errors and vulnerabilities. Or at least to report them. The quality of open libraries is crucial for all projects that can use them. For example, we conducted a small audit of the Open XML SDK code when we first got acquainted with this library.

Third-party developers created a lot of software for Office products. These are plugins for Word, Excel, Outlook. Many companies implemented themselves convenient plugins and report generators in Word format. On July 3, 2021 a terrible thing happened - Microsoft closed all the tickets on .NET 5+ in VSTO / COM support with a comment from its representatives:

Leave a Comment