- create a new XML Map in a workbook, specifying an XML schema
- specify XPath for cells showing how they map to the schema
- import an XML file, setting the cell values automatically
- export an XML file, created from the cells in the map
Thanks for your posting and using Aspose.Cells.
We need to investigate if your requirements/requested features are fully/partially supported or totally unavailable.
Could you please explain your requirements with detail? Please provide us your xml mapping files, source xls/xlsx file and expected output xls/xlsx file. Also, screenshots would be helpful.
We will look into your query and help you asap.
Hi,aspose-1:Hi,Thanks for your reply.Please find attached a simple example. Original.xslx is an empty workbook.Firstly, I want to be able to convert that to something like test.xslx, which contains an XML map (see also the attached screenshot). In other words, to upload a schema and specify the cells in the spreadsheet that map to parts of that schema.-----I hope this all makes sense. Please let me know if you need any more clarification. I think this feature would be useful to lots of developers wanting to get XML data into and back out of Excel.Many thanks,Matthew
Thanks for your sample files and providing us your detailed information about your requirements.
We will look into your queries and requirements and help/advise you asap.
We have logged this issue in our database. Once, we will have some update for you, we will let you know asap.
This issue has been logged as CELLSNET-41286.
Thanks for your posting and considering Aspose.Cells.
This issue is already logged. Once, we will have some update relating to it, we will inform you asap by posting on this thread.
The Xml Maps features are supported in the fix 21.7.7.
Aspose.Cells21.7.7 For .Net2_AuthenticodeSigned.Zip (5.6 MB)
Aspose.Cells21.7.7 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.7.7 For .NetStandard20.Zip (5.6 MB)
Workbook wb = new Workbook(); //create a new XML Map in a workbook, specifying an XML schema int mapIndex = wb.Worksheets.XmlMaps.Add("bookstore.xsd"); XmlMap xmlMap = wb.Worksheets.XmlMaps[mapIndex]; Worksheet sheet = wb.Worksheets; //specify XPath for cells showing how they map to the schema sheet.Cells.LinkToXmlMap(xmlMap.Name, 0, 0, "/bookstore/book"); //import an XML file, setting the cell values automatically wb.ImportXml("bookstoreData.xml", sheet.Name, 0, 0); wb.Save("output.xlsx"); sheet.Cells["B2"].PutValue("p1_m"); //export an XML file, created from the cells in the map wb.ExportXml(xmlMap.Name, "output.xml");
The files used in the sample code are attached: bookstore.zip (674 Bytes)
The issues you have found earlier (filed as CELLSNET-41286) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao