Class RevisionCellMove

RevisionCellMove class

Represents a revision record on a cell(s) that moved.

public class RevisionCellMove : Revision

Properties

NameDescription
DestinationArea { get; }Gets the destination area.
Id { get; }Gets the number of this revision.(Inherited from Revision.)
SourceArea { get; }Gets the source area.
SourceWorksheet { get; }Gets the source worksheet.
override Type { get; }Represents the type of revision.
Worksheet { get; }Gets the worksheet.(Inherited from Revision.)

Examples

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

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

            try
            {
                // Create an instance of the RevisionCellMove class using reflection
                // since the constructor is not directly accessible
                RevisionCellMove revisionCellMove = (RevisionCellMove)Activator.CreateInstance(
                    typeof(RevisionCellMove));

                // Display the read-only properties
                Console.WriteLine("Revision Type: " + revisionCellMove.Type);
                Console.WriteLine("Source Area: " + revisionCellMove.SourceArea);
                Console.WriteLine("Destination Area: " + revisionCellMove.DestinationArea);

                // Check if SourceWorksheet is available
                if (revisionCellMove.SourceWorksheet != null)
                {
                    Console.WriteLine("Source Worksheet: " + revisionCellMove.SourceWorksheet.Name);
                }
                else
                {
                    Console.WriteLine("Source Worksheet: null");
                }

                // Save the workbook
                workbook.Save("RevisionCellMoveDemo.xlsx");
                Console.WriteLine("RevisionCellMove demonstration completed successfully.");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error working with RevisionCellMove: {ex.Message}");
            }
        }
    }
}

See Also