Class HighlightChangesOptions

HighlightChangesOptions class

Represents options of highlighting revsions or changes of shared Excel files.

public class HighlightChangesOptions

Constructors

NameDescription
HighlightChangesOptions(bool, bool)Represents options of highlighting revsions or changes of shared Excel files.

Examples

[C#]

using Aspose.Cells;
using Aspose.Cells.Revisions;
using System;

namespace Demos
{
    public class HighlightChangesOptionsDemo
    {
        public static void HighlightChangesExample()
        {
            // Instantiate a Workbook object
            Workbook workbook = new Workbook("HighlightedChangesWorkbook_original.xlsx");

            // Get the revision logs
            RevisionLogCollection revisionLogs = workbook.Worksheets.RevisionLogs;

            // Set the number of days to preserve the history
            revisionLogs.DaysPreservingHistory = 30;

            // Create HighlightChangesOptions
            HighlightChangesOptions options = new HighlightChangesOptions(true, true);

            // Highlight changes
            revisionLogs.HighlightChanges(options);

            // Save the workbook with highlighted changes
            workbook.Save("HighlightedChangesWorkbook.xlsx");
            workbook.Save("HighlightedChangesWorkbook.pdf");
        }
    }
}

See Also