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.document_version property to change it programmatically using Aspose.Cells for Python via .NET 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.document_version property.
Sample Code
from aspose.cells import SaveFormat, Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# Create workbook object | |
wb = Workbook() | |
# Access built-in document property collection | |
bdpc = wb.built_in_document_properties | |
# Set the title | |
bdpc.title = "Aspose File Format APIs" | |
# Set the author | |
bdpc.author = "Aspose APIs Developers" | |
# Set the document version | |
bdpc.document_version = "Aspose.Cells Version - 18.3" | |
# Save the workbook in xlsx format | |
wb.save("outputSpecifyDocumentVersionOfExcelFile.xlsx", SaveFormat.XLSX) |