Çalışma Kitabı Meta Verisi Kullanımı
Contents
[
Hide
]
Aspose.Cells, çalışma kitabının hafif bir sürümünü hafızaya yükleyerek meta veri bilgilerini düzenlemenize olanak tanır. Lütfen çalışma kitabını yüklemek için com.aspose.cells.WorkbookMetadata sınıfını kullanın.
WorkbookMetadata Kullanımı
Aşağıdaki örnek kod, bir çalışma kitabının özel belge özelliklerini düzenlemek için WorkbookMetadata sınıfını kullanır. Bir çalışma kitabını Workbook sınıfını kullanarak açtığınızda belge özelliklerini okuyabilirsiniz.
İşte WorkbookMetadata sınıfını kullanarak örnek bir kod.
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-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(UsingWorkbookMetadata.class); | |
// Open Workbook metadata | |
MetadataOptions options = new MetadataOptions(MetadataType.DOCUMENT_PROPERTIES); | |
WorkbookMetadata meta = new WorkbookMetadata(dataDir + "Sample1.xlsx", options); | |
// Set some properties | |
meta.getCustomDocumentProperties().add("test", "test"); | |
// Save the metadata info | |
meta.save(dataDir + "Sample1.out.xlsx"); | |
// Open the workbook | |
Workbook w = new Workbook(dataDir + "Sample1.out.xlsx"); | |
// Read document property | |
System.out.println(w.getCustomDocumentProperties().get("test")); |