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 une carte XML en utilisant Aspose.Cells

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

todo:image_alt_text
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Create a workbook
Workbook workbook = new Workbook();
// URL that contains your XML data for mapping
string XML = "http://www.aspose.com/docs/download/attachments/434475650/sampleXML.txt";
// Import your XML Map data starting from cell A1
workbook.ImportXml(XML, "Sheet1", 0, 0);
// Save workbook
workbook.Save(dataDir + "output_out.xlsx");

Sujets avancés