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
pgscannell said,
April 12, 2016 @ 2:00 pm
Eric,
I just viewed Bob McCarendon’s podcast making use of MemorySpreadsheet and WorksheetAccessor classes and would like to download the code. I don’t know where to go to get it. A link was provided but it took me to a Power Tools discussion.
Paul
Eric White said,
April 12, 2016 @ 4:04 pm
Hi Paul,
This code is in Open-Xml-PowerTools.
http://www.ericwhite.com/blog/blog/open-xml-powertools-developer-center/
http://www.ericwhite.com/blog/blog/open-xml-installation-center/
Cheers, Eric
faunus said,
April 20, 2016 @ 12:45 pm
https://msdn.microsoft.com/en-us/library/ee198332(v=office.12).aspx
Where am I from the above six files found?
tks.
faunus said,
April 20, 2016 @ 12:46 pm
oartdocprop.xsd
orel.xsd
oartsp3dstyles.xsd
oartsp3dscene.xsd
oartspeffects.xsd
oartsplineproperties.xsd
oartbasetypes.xsd
about this
dsudbury said,
May 31, 2016 @ 11:41 pm
Thank you so much for continuing this work. I realise I am a bit late to this party, but I had put my OOXML tools down for a bit and when I went looking for new OOXML tools imagine my surprise. You really helped me a few years back and I am super please you are able to balance your work/life to continue on โ as you are able.
I am still working using MS Word/PowerPoint to produce learning content that can be imported into learning management systems i.e. โ take a word document with images and produce a SCORM or IMS content package. A speciality field but as so many instructional designers use MS Word and so many have zero tools to useโฆwell here I am
Thanks for being here.
David
Eric White said,
June 14, 2016 @ 3:48 am
Hi David,
A number of years ago, I saw a short comedy film about a composer who wrote a single catchy tune, and built his entire career writing variations on this tune. Sometimes I feel like that with regards to Open XML! ๐
But the thing is, document formats (particularly Open XML), combined with functional programming, is complex and interesting enough that it keeps me fully occupied and engaged. There is so much more to do in this area – I have covered at most 20% of what is possible. I have no intention of stopping in the near future.
Cheers, Eric
Anonymous said,
June 18, 2016 @ 1:37 am
I am trying to generate and manipulate documents in open xml format (.docx or .dot). I googled a lot. All the content in the msdn site is archived and stated to be outdated. The openxmldeveloper.org site is not maintained. Brian joans and erich white are two authors writing blogs in this topic. They also seem to stop post new contents. I tried to use the openxml sdk 2.5. The support seems to be stopped. Any comments friends? is there any alternative technology other than openXml?
Eric White said,
June 19, 2016 @ 4:38 am
Hi,
Regarding posting new content, lately I have not been posting new content because I was working very hard on a new module, WmlComparer, for Open-Xml-PowerTools. It is, IMO, a great new addition to Open-Xml-PowerTools. I’ll be posting videos and blog posts in the near future.
But yes, the level of effort has decreased.
-Eric
prasad said,
July 6, 2016 @ 10:54 pm
Hi Eric,
I am exploring options to convert the richtextcontrol contents to html using wmltoHTMLconverter… and just wondering is there a way to get the richtextcontent control by tag name and then get the content out in HTML format.
Thanks
Grant said,
August 13, 2016 @ 4:45 pm
Hi Eric,
I downloaded the Custom UI Editor and, for the
most part it works great.
I tried opening an existing (and running) VBA ribbon
XML and get a “File has corrupted data” message.
The XML is all correct and does run wo errors.
What does this error mean?
How can it be corrected?
I can email you the .xml file if it would help to
troubleshoot this problem.
Thanks, Grant
gdevlekar said,
September 5, 2016 @ 3:25 pm
how to add character spacing for range of characters in open xml c#
like i want to give character spacing In word toggling for 2 characters
gg of spacing=”Expanded” with By value of 1pt
gdevlekar said,
September 5, 2016 @ 3:26 pm
how to add character spacing for range of characters in open xml c#
like i want to give character spacing In word toggling for 2 characters
gg of spacing=”Expanded” with By value of 1pt
http://stackoverflow.com/questions/39332782/add-character-spacing-for-range-of-character-in-open-xml-c-sharp
Eric White said,
September 16, 2016 @ 6:05 pm
@gdevlekar,
One thing – if you use the forums on my web site, it is easier to have a conversation thread about a topic ๐
It sounds as though you need to learn how to produce markup for a very specific scenario. I’m not fully clear on your exact scenario, but in general, it is super easy to research Open XML markup. I have made a screen-cast that explains the process I go through to learn about Open XML markup.
See screen-cast #13 in the following series:
http://www.ericwhite.com/blog/introduction-to-open-xml-series/
You might also be interested in the others in the series. Knowing some basics about how to work with Open XML can significantly save you time in your project.
Cheers, Eric
Satish said,
December 14, 2016 @ 7:02 pm
Hi Eric,
I have to check who modified what in.docx file using Open XML. Can you Please guide.
Satish said,
December 14, 2016 @ 7:07 pm
For Example, Suppose i have created Sample.docx and shared with another user(i.e.David) to add content. Another user added/modified content like paragraph, change fond etc. Using Open XML, i need to check what is modified by Another user and show another user name (i.e. David )in c# console application.
Ronda said,
January 13, 2017 @ 12:37 pm
Eric,
The WMLComparer really saved a project. Working with a client who refused to install Word on the server blew away my Interop solution for comparing documents. I found your tool and have never really worked with OpenXML but will be in the future! This was the easiest implementation ever and is a credit to your hard work, will be talking about the tool and linking back to your site sometime soon!
Looking for a way to change the compare text from blue to red now…
Thanks for all your work!