XmlMapCollection.Add Yöntemi Kullanarak Çalışma Kitabının İçine XML Haritası Ekle
Olası Kullanım Senaryoları
Aspose.Cells, çalışma kitabınızın içine XML haritasını içe aktarmak için kullanabileceğiniz XmlMapCollection.Add() yöntemini sağlar.
XmlMapCollection.Add yöntemini kullanarak İçine ‘XmlMap’ ekleyin
Aşağıdaki örnek kod, XmlMapCollection.Add() yöntemini kullanarak çalışma kitabının içine XML Haritası ekler ve çıktı excel dosyası olarak kaydeder. Ekran görüntüsü, örnek.xml içinden içe aktarılan XML Haritayı göstermektedir.
Örnek Kod
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getSharedDataDir(AddXMLMapInsideWorkbook.class) + "articles/"; | |
// Create workbook object | |
Workbook wb = new Workbook(); | |
// Add xml map found inside the sample.xml inside the workbook | |
wb.getWorksheets().getXmlMaps().add(dataDir + "sample.xml"); | |
// Save the workbook in xlsx format | |
wb.save(dataDir + "AddXMLMapInsideWorkbook_out.xlsx"); |