Çalışma Kitabının İçine Bağlı XML Haritasından XML Verilerini Dışa Aktar
Contents
[
Hide
]
Çalışma Kitabı içinde XML Haritasına bağlı XML Verilerini Dışa Aktar
Lütfen kitabınızdaki XML Haritalarına bağlı XML verilerini dışa aktarmak için Workbook.export_xml() yöntemini kullanın. Aşağıdaki örnek kod, kitaptaki tüm XML Haritalarının XML verilerini sırayla dışa aktarır. Bu kodda kullanılan örnek excel dosyasını ve dışa aktarılan ilk XML Haritasının XML verilerini kontrol edin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aspose.cells import Workbook | |
from os import os, path | |
# 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 directory if it is not already present. | |
IsExists = path.isdir(dataDir) | |
if notIsExists: | |
os.makedirs(dataDir) | |
# Instantiating a Workbook object. | |
workbook = Workbook(dataDir + "sample.xlsx") | |
# Export all XML data from all XML Maps from the Workbook. | |
for i in range(len(workbook.worksheets.xml_maps)): | |
# Access the XML Map. | |
map = workbook.worksheets.xml_maps[i] | |
# Exports its XML Data to file. | |
workbook.export_xml(map.name, dataDir + map.name + ".xml") |