Enum RevisionType

RevisionType enumeration

Represents the revision type.

public enum RevisionType

Values

NameValueDescription
CustomView0Custom view.
DefinedName1Defined name.
ChangeCells2Cells change.
AutoFormat3Auto format.
MergeConflict4Merge conflict.
Comment5Comment.
Format6Format.
InsertSheet7Insert worksheet.
MoveCells8Move cells.
Undo9Undo.
QueryTable10Query table.
InsertDelete11Inserting or deleting.
RenameSheet12Rename worksheet.
Unknown13Unknown.

Examples

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

    public class RevisionsClassRevisionTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook for demonstration
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            try
            {
                // Demonstrate using different RevisionType enum values
                RevisionType customViewType = RevisionType.CustomView;
                RevisionType changeCellsType = RevisionType.ChangeCells;
                RevisionType insertSheetType = RevisionType.InsertSheet;

                // Display enum values and their underlying integer values
                Console.WriteLine("CustomView type: " + customViewType + " (Value: " + (int)customViewType + ")");
                Console.WriteLine("ChangeCells type: " + changeCellsType + " (Value: " + (int)changeCellsType + ")");
                Console.WriteLine("InsertSheet type: " + insertSheetType + " (Value: " + (int)insertSheetType + ")");

                // Demonstrate checking revision types
                if (workbook.HasRevisions)
                {
                    Console.WriteLine("Workbook contains revisions");
                }
                else
                {
                    Console.WriteLine("Workbook has no revisions");
                }

                // Save the workbook
                workbook.Save("RevisionTypeDemo.xlsx");
                Console.WriteLine("Workbook saved successfully");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error working with RevisionType: {ex.Message}");
            }
        }
    }
}

See Also