Aspose.Cells te Özel XML Parçalarını Kullanma

Aspose.Cells’te Özel XML Parçalarını Kullanma

Aşağıdaki örnek kod, Workbook.getContentTypeProperties().add() yöntemini kullanır ve Book Catalog Xml adlı yapıya ekler, adı ise BookStore. Bu kodun sonucunu gösteren aşağıdaki görsel, Book Catalog Xml’in bu özelliğin adı olan BookStore düğümünün içine eklendiğini gösterir.

todo:image_alt_text

// 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.getDataDir(UsingCustomXmlParts.class);
String booksXML = "<catalog><book><title>Complete C#</title><price>44</price></book><book><title>Complete Java</title><price>76</price></book><book><title>Complete SharePoint</title><price>55</price></book><book><title>Complete PHP</title><price>63</price></book><book><title>Complete VB.NET</title><price>72</price></book></catalog>";
Workbook workbook = new Workbook();
workbook.getContentTypeProperties().add("BookStore", booksXML);
workbook.save(dataDir + "output.xlsx");

İlgili Makale