How to convert Excel or Word to JSON

      No Comments on How to convert Excel or Word to JSON

XML ValidatorBuddy allows to easily convert XML to JSON (you can learn more about this functionality here: XML to JSON conversions). Modern documents saved from Word or Excel are created as archives containing XML documents with the actual content. This means you can extract all of the documents from the archive and open them using XML ValidatorBuddy.

As a first step, you need to extract the archive to a separate folder. Afterwards, you can open all of the files from the archive in the editor.

Open MS Word document

You find the content of the Word document at the following archive path: word/document.xml. A typical XML looks like you can see on the screenshot below:

Content from MS Word as XML

Content from MS Word as XML

Text content is placed in w:t XML elements. The Grid view in XML ValidatorBuddy helps to get a better understanding how the XML data is organised. Use the “Convert XML to JSON” command from the “XML” menu if you want to get JSON text from the current XML.

Open MS Excel document

For Excel you will find the data of the single worksheets in the xlworksheets folder within the .xslx archive. Extract the worksheet XML files wherever you want and open the document in XML Validator Buddy. The XML will be in one line but after you have converted it to JSON the output is pretty-printed and well-formed. So all you have to do afterward is to save it on disk.

As a second option for data coming from Excel, the editor also supports to convert CSV input to XML or JSON. This means you can export your spreadsheet data to a CSV file and generate XML or JSON from it using XML ValidatorBuddy or JSONBuddy.

»crosslinked«

Leave a Reply