Archive for March, 2016

Open-Xml-PowerTools and JavaScript

One issue that many Open XML developers face when doing Open XML development in JavaScript is the need for many of the important modules available in Open-Xml-PowerTools.

To date, almost none of the Open-Xml-PowerTools have been converted to JavaScript (in a publicly releasable form).

However, I designed the Open-Xml-Sdk for JavaScript with the specific intention to enable manual conversion of Open-Xml-PowerTools code from C# to JavaScript. The Ltxmljs library is semantically compatible with the .NET LINQ to XML library. The Open-Xml-Sdk for JavaScript was designed with the idea that the common idioms that we use in the Open-Xml-Sdk can be converted to JavaScript with ease.

Proof-in-the-pudding is that I converted thousands of lines of code (of a preliminary version of the WmlToHtmlConverter) to JavaScript. This included the FormattingAssembler module, the ListItemRetriever module, the HtmlConverter module, and more. It worked very nicely. However, because this was based on a half-baked WmlToHtmlConverter, I decided that I wanted to first polish those modules as written in C#, and then at some future point in time convert the finished modules to JavaScript. I fully expect to convert these modules to JavaScript (but it is not going to happen in the near future, as my current projects prohibit an effort of this magnitude).

Key points:

  • It is doable.
  • It is non-trivial. You should be expert in C#, HTML, CSS, JavaScript, LINQ to XML, functional programming, and Open XML markup. I don’t want to minimize what you must know in order to tackle conversion of one of these modules to JavaScript.

But it is doable. I have a goal to do this, but it must fit in with other priorities in my life, like keeping my kid and wife with groceries. 🙂

Cheers, Eric

Comments (16)

Welcome to the new EricWhite.com

Hi friends,

With the recent decision to shutter OpenXmlDeveloper.org, I will be focusing my efforts to support Open XML developers here at EricWhite.com.

Forums: I have set up forums on this web site, so that we have a convenient place to discuss Open XML specific questions.  I have set up forum categories based on my experience with OpenXmlDeveloper.org – there are fewer categories, which should make it easier to pick the appropriate forum for your questions. Feel free to suggest new forum categories. Forums link are in the sidebar. You will need to have an account here to post in the forums. Please feel free to create one. At the top of each forum, you can subscribe, which will send email notifying you of activity.

Content: I have moved much of the content from OpenXmlDeveloper.org to this web site. Over the next month or two, I’ll be moving the rest of the interesting content here.  In the process of moving this content over, I’ll be reviewing and updating it, making sure that it recommends current best practices for Open XML development.  In addition to moving the content over, I have created ‘Developer Centers’ around specific topics such as Open-Xml-PowerTools, DocumentAssembler, DocumentBuilder, PresentationBuilder, WmlToHtmlConverter, and HtmlToWmlConverter.

Blogging: I will be regularly blogging about my Open XML activities here.

Twitter: Follow me (@EricWhiteDev) on twitter to get the latest news about Open XML development and tools.

LinkedIn: Connect, especially if you are an Open XML developer.

I will continue to enhance and support Open-Xml-PowerTools – it is a ‘live project’, with interesting enhancements planned for the near future.  I consider that Open-Xml-PowerTools is perhaps 25% complete – there is an awful lot that we can do to make server-side Open XML document generation and processing easier.  My plans are firming up for the next round of enhancements – stay tuned – I’ll keep you posted.

We have done nowhere near enough with the Open-Xml-Sdk-for-JavaScript.  There are great advantages to processing Open XML with JavaScript – cross-platform – process in browser – process with NodeJs.  And should take advantage of TypeScript, I think.

I love document formats.  I love the capacity to create and process rich content that we have gained due to the standardization of the Open XML format.  We have made great progress over the years, and I am looking forward to continuing to advance the state-of-the-art of document generation and processing.

As an aside, one thing that I am going to enjoy a lot is moving off of the old version of Telligent Community Server that we were using for OpenXmlDeveloper.org – what a pain.  EricWhite.com is a WordPress site, updated to the latest version. It is a pleasure to move into a modern, blogging / content management platform.  The forums here are implemented using bbPress, which gives us a flexible, easy to use platform.

Cheers, Eric

Comments (25)