Node.js ve C++ kullanarak Excel Dosyasının Belge Sürümünü Belge Özellikleri ile belirtin
Contents
[
Hide
]
Olası Kullanım Senaryoları
Bir Excel dosyasının Sürüm numarasını sağ tıklayarak ve sonra Özellikler > Ayrıntılar seçerek değiştirebilirsiniz. Programlı olarak değiştirmek için lütfen BuiltInDocumentPropertyCollection.getDocumentVersion() özelliğini Aspose.Cells API’leri ile kullanın.
Aspose.Cells kullanarak Excel Dosyasının Belge Sürümünü Belirtme
Aşağıdaki örnek kod, bir çalışma kitabı oluşturur ve bu kitabın Title, Yazarlar ve Sürüm numarası gibi dahili belge özelliklerini değiştirir. Bu kod tarafından oluşturulan çıktı Excel dosyasını ve modifiye edilen Sürüm numarasını gösteren ekran görüntüsünü inceleyin.
Örnek Kod
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "outputSpecifyDocumentVersionOfExcelFile.xlsx");
// Create workbook object
const wb = new AsposeCells.Workbook();
// Access built-in document property collection
const bdpc = wb.getBuiltInDocumentProperties();
// Set the title
bdpc.setTitle("Aspose File Format APIs");
// Set the author
bdpc.setAuthor("Aspose APIs Developers");
// Set the document version
bdpc.setDocumentVersion("Aspose.Cells Version - 18.3");
// Save the workbook in xlsx format
wb.save(filePath, AsposeCells.SaveFormat.Xlsx);