Importer des XML dans une classeur Excel

Importer une carte XML en utilisant Microsoft Excel

La capture d’écran suivante montre comment importer une carte XML en utilisant Microsoft Excel

todo:image_alt_text

Importer la carte XML avec Aspose.Cells pour Python via .NET

Le code exemple suivant montre comment utiliser Workbook.import_xml(). Il génère le fichier Excel de sortie comme indiqué dans cette capture d’écran.

todo:image_alt_text
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 a workbook
workbook = Workbook()
# URL that contains your XML data for mapping
XML = "http://www.aspose.com/docs/download/attachments/434475650/sampleXML.txt"
# Import your XML Map data starting from cell A1
workbook.import_xml(XML, "Sheet1", 0, 0)
# Save workbook
workbook.save(dataDir + "output_out.xlsx")

Sujets avancés