Class RevisionLogCollection
Contents
[
Hide
]RevisionLogCollection class
Represents all revision logs.
public class RevisionLogCollection : CollectionBase<RevisionLog>
Properties
Name | Description |
---|---|
Capacity { get; set; } | |
Count { get; } | |
DaysPreservingHistory { get; set; } | Gets and sets the number of days the spreadsheet application will keep the change history for this workbook. |
Item { get; } | Gets RevisionLog by index. |
Item { get; set; } |
Methods
Name | Description |
---|---|
BinarySearch(RevisionLog) | |
BinarySearch(RevisionLog, IComparer<RevisionLog>) | |
BinarySearch(int, int, RevisionLog, IComparer<RevisionLog>) | |
Clear() | |
Contains(RevisionLog) | |
CopyTo(RevisionLog[]) | |
CopyTo(RevisionLog[], int) | |
CopyTo(int, RevisionLog[], int, int) | |
Exists(Predicate<RevisionLog>) | |
Find(Predicate<RevisionLog>) | |
FindAll(Predicate<RevisionLog>) | |
FindIndex(Predicate<RevisionLog>) | |
FindIndex(int, Predicate<RevisionLog>) | |
FindIndex(int, int, Predicate<RevisionLog>) | |
FindLast(Predicate<RevisionLog>) | |
FindLastIndex(Predicate<RevisionLog>) | |
FindLastIndex(int, Predicate<RevisionLog>) | |
FindLastIndex(int, int, Predicate<RevisionLog>) | |
GetEnumerator() | |
HighlightChanges(HighlightChangesOptions) | Highlights changes of shared workbook. |
IndexOf(RevisionLog) | |
IndexOf(RevisionLog, int) | |
IndexOf(RevisionLog, int, int) | |
LastIndexOf(RevisionLog) | |
LastIndexOf(RevisionLog, int) | |
LastIndexOf(RevisionLog, int, int) | |
RemoveAt(int) |
Examples
using System;
using Aspose.Cells;
using Aspose.Cells.Revisions;
namespace AsposeCellsExamples
{
public class RevisionsClassRevisionLogCollectionDemo
{
public static void Run()
{
Workbook wb = new Workbook("example.xlsx");
if (!wb.HasRevisions)
{
Console.WriteLine("Workbook has no revisions");
return;
}
RevisionLogCollection revisionLogs = wb.Worksheets.RevisionLogs;
Console.WriteLine($"Found {revisionLogs.Count} revision logs");
foreach (RevisionLog log in revisionLogs)
{
foreach (Revision revision in log.Revisions)
{
if (revision.Type == RevisionType.ChangeCells)
{
RevisionCellChange cellChange = (RevisionCellChange)revision;
Console.WriteLine($"Cell change at {cellChange.CellName} (Row {cellChange.Row})");
if (cellChange.OldFormula != null)
{
Console.WriteLine($"Old formula: {cellChange.OldFormula}");
}
}
}
}
}
}
}
See Also
- class CollectionBase<T>
- class RevisionLog
- namespace Aspose.Cells.Revisions
- assembly Aspose.Cells