共有ワークブックのリビジョン ログの履歴を保持する更新日数
考えられる使用シナリオ
ワークブックを共有すると、次のオプションが表示されます変更履歴を N 日間保持する 次のスクリーンショットに示すように。 Aspose.Cells を使用して、履歴を保存する日数を更新できます。WorksheetCollection.RevisionLogs.DaysPreservingHistory 財産。
共有ワークブックのリビジョン ログの履歴を保持する更新日数
次のサンプル コードは、空のワークブックを作成し、それを共有して、履歴を保存するリビジョン ログの日数を 7 日間 (通常は 30 日間) に更新します。をご覧ください出力エクセルファイル 参照用のコードによって生成されます。
サンプルコード
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 empty workbook
Workbook wb = new Workbook();
//Share the workbook
wb.getSettings().setShared(true);
//Update DaysPreservingHistory of RevisionLogs
wb.getWorksheets().getRevisionLogs().setDaysPreservingHistory(7);
//Save the workbook
wb.save("outputShared_DaysPreservingHistory.xlsx");