Enum RevisionActionType

RevisionActionType enumeration

Represents the type of revision action.

public enum RevisionActionType

Values

NameValueDescription
Add0Add revision.
Delete1Delete revision.
DeleteColumn2Column delete revision.
DeleteRow3Row delete revision.
InsertColumn4Column insert revision.
InsertRow5Row insert revision.

Examples

namespace AsposeCellsExamples
{
    using Aspose.Cells;
    using Aspose.Cells.Revisions;
    using System;

    public class RevisionsClassRevisionActionTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook with revision tracking
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Perform various operations that generate different revision types
            worksheet.Cells["A1"].PutValue("Initial Value");
            worksheet.Cells.InsertRow(0);
            worksheet.Cells.DeleteRow(1);
            worksheet.Cells.InsertColumn(0);
            worksheet.Cells.DeleteColumn(1);

            // Check if workbook has revisions
            if (workbook.HasRevisions)
            {
                // Note: The original API doesn't provide direct access to revisions collection
                // So we'll just demonstrate the RevisionActionType enum as requested
                Console.WriteLine("Workbook contains revisions (but API doesn't provide access)");
            }

            // Demonstrate using RevisionActionType enum values
            Console.WriteLine("Available revision action types:");
            foreach (RevisionActionType actionType in Enum.GetValues(typeof(RevisionActionType)))
            {
                Console.WriteLine($"{actionType} = {(int)actionType}");
            }

            // Save the workbook
            workbook.Save("RevisionActionTypeDemo.xlsx");
        }
    }
}

See Also