How to save xlsx file (office 2007) in XML file format

I am trying to save an xlsx office 2007 xlsx file in XML format so that I can read it programmatically.

When saving the xlsx file as xml, it gives the error "Cannot save XML data. The bcoz workbook does not support XML mapping."

I found that I need to add an XML mapping first, and then this is possible. At the 2007 Office site, they mentioned that they first import the xsd file for XML mapping, and then it can be saved as an XML file.

So please tell me how to create an xsd file from an xlsx file.

Also tell me what can be done to save the file as an XML file, other than this.

Note. I could not use any external tool to convert xlsx to xml, because the user needs to create the xml file of the file using "save as".

I used Convert xls softinterface, which converted the xlsx file to the xml office 2007 format. But this software can only work with windows. My server is Linux.

+4
source share
1 answer

The easiest way is to possibly instruct users to save it in XML Spreadsheet 2003 format. This XML format is easy to understand and simple for further processing.

In this format, you do not need to map XML, a schema file, etc.

+6
source

Source: https://habr.com/ru/post/1333268/


All Articles