BuiltIn ドキュメント プロパティを使用して Excel ファイルのドキュメント バージョンを指定する
Contents
[
Hide
]
考えられる使用シナリオ
を変更できます。バージョンナンバーファイルを右クリックしてから選択することにより、Excelファイルのプロパティ > 詳細を編集し、バージョンナンバー分野。使ってくださいBuiltInDocumentPropertyCollection.DocumentVersionプロパティを使用して、Aspose.Cells API を使用してプログラムで変更します。
BuiltIn ドキュメント プロパティを使用して Excel ファイルのドキュメント バージョンを指定する
次のサンプル コードは、ワークブックを作成し、組み込みのドキュメント プロパティを変更します。題名, 著者とバージョンナンバー.をご覧ください出力エクセルファイルコードによって生成され、変更されたバージョンナンバー沿ってBuiltInDocumentPropertyCollection.DocumentVersion財産。
サンプルコード
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 | |
//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); |