Importer une carte XML dans un classeur à l'aide de Aspose.Cells

Importer une carte XML à l’aide d’Excel Microsoft

La capture d’écran suivante montre comment importer une carte XML à l’aide de Microsoft Excel.

tâche : image_autre_texte

Importer une carte XML à l’aide de Aspose.Cells

L’exemple de code suivant montre comment utiliserClasseur.importXml(). Il génère lafichier excel de sortie comme le montre cette capture d’écran.

tâche : image_autre_texte

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
String dataDir = Utils.getDataDir(ImportXMLMap.class);
// 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.xlsx");