أضف خريطة XML داخل المصنف باستخدام طريقة XmlMapCollection.Add
Contents
[
Hide
]
سيناريوهات الاستخدام الممكنة
يوفر Aspose.CellsXmlMapCollection.Add () الطريقة التي يمكنك استخدامها لاستيراد خريطة XML الخاصة بك داخل المصنف.
أضف خريطة XML داخل المصنف باستخدام طريقة XmlMapCollection.Add
يضيف نموذج التعليمات البرمجية التالي مخطط XML داخل المصنف باستخدام ملفXmlMapCollection.Add () الطريقة ويحفظها باسمملف اكسل الناتج . تُظهر لقطة الشاشة خريطة XML التي تم استيرادها من ملفsample.xml داخل ملف الإخراج إكسل.
This file contains 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
// 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 workbook object | |
Workbook wb = new Workbook(); | |
// Add xml map found inside the sample.xml inside the workbook | |
wb.Worksheets.XmlMaps.Add(dataDir + "sample.xml"); | |
// Save the workbook in xlsx format | |
wb.Save(dataDir + "output_out.xlsx"); |