WorkbookMetadata'yı Kullanma
Contents
[
Hide
]
Aspose.Cells, meta veri bilgilerini düzenlemek için çalışma kitabının hafif bir sürümünü belleğe yüklemenizi sağlar. lütfenÇalışma KitabıMeta verileriçalışma kitabını yüklemek için sınıf.
Aşağıdaki örnek kod kullanırÇalışma KitabıMeta verileri çalışma kitabının özel belge özelliklerini düzenlemek için sınıf. Çalışma kitabını kullanarak açtığınızdaÇalışma kitabı sınıf, belge özelliklerini okuyabileceksiniz. İşte kullanan bir örnek kodÇalışma KitabıMeta verilerisınıf.
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); | |
// Open Workbook metadata | |
MetadataOptions options = new MetadataOptions(MetadataType.DocumentProperties); | |
WorkbookMetadata meta = new WorkbookMetadata(dataDir + "Sample1.xlsx", options); | |
// Set some properties | |
meta.CustomDocumentProperties.Add("test", "test"); | |
// Save the metadata info | |
meta.Save(dataDir + "Sample2.out.xlsx"); | |
// Open the workbook | |
Workbook w = new Workbook(dataDir + "Sample2.out.xlsx"); | |
// Read document property | |
Console.WriteLine(w.CustomDocumentProperties["test"]); | |
Console.WriteLine("Press any key to continue..."); | |
Console.ReadKey(); |