Created attachment 24073 [details] The original XLSX file Hi, I've tried the new tool to import XML into XSLSX files using the Custom XML mapping and I found a problem. If you load an XSLS file, import data from XML and then save the XLSX back to file, the xmlMaps.xml part becomes corrupted. I've attached two XLSX file to show the problem. If you open the original xmlMaps.xml file it looks like this: <Schema ID="Schema13" Namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <xsd:schema targetNamespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" elementFormDefault="qualified" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> while the file saved from POI looks like this: <Schema ID="Schema13" Namespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> <xsd:schema targetNamespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> It seems that the xmlns attribute of the inner xsd:schema element is removed by XMLBeans (I don't know if it's not saved or not readed from the original file).
Created attachment 24074 [details] The file modified by POI
Roberto, please post a complete example how to reproduce the problem - I don't quite understand what is wrong. Load / Save of the attached file works OK. I tried to apply the code from TestXSSFImportFromXML.testMultiTable() to the attached file and it produced a valid xlsx output. Basically, you need to tell XmlBeans that you are saving a file with additional namespaces. A good example how to do it is XSSFDrawing.commit(). Yegor
No update since a long time and the bug is not reproducible, therefore closing this WORKSFORME for now, please post more information if you still think there is a bug.