Add XML Map inside the Workbook using XmlMapCollection.Add method
Possible Usage Scenarios
Aspose.Cells for Python via .NET provides XmlMapCollection.add() method which you can use to import your XML Map inside the workbook.
Add XML Map inside the Workbook using XmlMapCollection.Add method
The following sample code adds XML Map inside the workbook using the XmlMapCollection.add() method and saves it as output excel file. The screenshot shows the XML Map that has been imported from the sample.xml inside the output excel file.
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Create workbook object | |
wb = Workbook() | |
# Add xml map found inside the sample.xml inside the workbook | |
wb.worksheets.xml_maps.add(dataDir + "sample.xml") | |
# Save the workbook in xlsx format | |
wb.save(dataDir + "output_out.xlsx") |