Specify Document Version of the Excel File using BuiltIn Document Properties

Possible Usage Scenarios

You can change the Version number of Excel file by right-clicking the file and then selecting Properties > Details and then editing the Version number field. Please use BuiltInDocumentPropertyCollection.DocumentVersion property to change it programmatically using Aspose.Cells APIs.

Specify Document Version of the Excel File using BuiltIn Document Properties

The following sample code creates a workbook and changes its built-in document properties that include Title, Authors and Version number. Please see the output Excel file generated by the code and screenshot that shows the modified Version number by BuiltInDocumentPropertyCollection.DocumentVersion property.

todo:image_alt_text

Sample Code

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
//Create workbook object
Workbook wb = new Workbook();
//Access built-in document property collection
BuiltInDocumentPropertyCollection 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("outputSpecifyDocumentVersionOfExcelFile.xlsx", SaveFormat.XLSX);