How to get started with Open XML Formats Programming?
Hello!
Does anyone knows where can I find articles or sample code to help me get started with Open XML Formats programming? What I wanted to do is programmatically open multiple Word 2007 (docx) files on the server; perform search and replace text and merge all the opened files into a single file. Any help is greatly appreciated.
[459 byte] By [
Ptan] at [2008-2-11]
Here is my problem: My organization wants to upload word documents from users to the server. On the server side, the word dcoument (enforced with styles) needs to be converted to XML format files. Next, I need to use php to parse the open xml formats files and put the content into the database. Does anyone know how to convert word to XML on server side automatically?Is there any API or sample codes for php to parse Open XML Formats? Your suggestions are appreciated.
> the word document (enforced with styles) needs to be converted to XML format files
Rather than doing this on the server, have the documents saved from Word in Open XML. This can be done even on older versions of Word (2000, XP, 2003), using this extension from Microsoft:
How to use earlier versions of Excel, PowerPoint, and Word to open and save files from 2007 Office programs.
http://support.microsoft.com/kb/924074
If many documents already exist, then consider making a batch process to convert them all.
> Is there any API or sample codes for php to parse Open XML Formats?
I also suggest http://openxmldeveloper.org/
In particular, there is one guy with an article there who is doing the OPPOSITE problem -- creating Open XML documents from PHP.
His code won't directly help you, but talk to him, see if he is willing to help you:
http://blogs.balliauw.be/blogs/maarten/archive/tags/PHP/default.aspx