Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / CellRange Class
Members Example


In This Topic
    CellRange Class
    In This Topic

    Represents a rectangular range of Cells. The top-left and bottom-right Cells delimit the range.

    Syntax
    Remarks
    This class derives from StyledRange.
    Example
    using( var doc = Workbook.Load( "test.xlsx") )
      {
        var worksheet = doc.Worksheets[ 0 ];        
        var firstTableCellRange = worksheet.Tables[ 0 ].CellRange;
    
        var cellRangeStartCell = firstTableCellRange.StartingElement;
        var cellRangeEndCell = firstTableCellRange.EndingElement;
      }
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.WorkbookElement
          Xceed.Workbooks.NET.WorksheetElement
             Xceed.Workbooks.NET.StyledWorksheetElement
                Xceed.Workbooks.NET.StyledRange<T>
                   Xceed.Workbooks.NET.CellRange

    Public Properties
     NameDescription
    Public PropertyOverridden. Gets the number of Cells within the CellRange.  
    Public PropertyGets or sets the CellRange's DataValidation.  
    Public PropertyGets the items in the range. (Inherited from Xceed.Workbooks.NET.StyledRange<Cell>)
    Public PropertyGets or sets the last item in the range. (Inherited from Xceed.Workbooks.NET.StyledRange<Cell>)
    Public PropertyGets or sets the first item in the range. (Inherited from Xceed.Workbooks.NET.StyledRange<Cell>)
    Public PropertyGets the Style used by the Worksheet element. (Inherited from Xceed.Workbooks.NET.StyledWorksheetElement)
    Top
    Public Methods
     NameDescription
    Public MethodAdds ConditionalFormatting to the CellRange.  
    Public MethodOverridden. Clears specific elements in the CellRange.  
    Public MethodRemoves all ConditionalFormattings from the CellRange.  
    Public MethodOverloaded. Copies a CellRange & pastes it to another location.  
    Public MethodOverloaded. Cuts a CellRange & pastes it to another location.   
    Public Method  
    Public MethodGets the CellRange's ConditionalFormattings.  
    Public Method  
    Public MethodGets a list of Cells that have failed the DataValidation process.  
    Public MethodReturns the Worksheet associated with the CellRange.  
    Public MethodAdds the CellRange in the MergedCellCollection.  
    Public Method  
    Public MethodOverridden. Searches into the content of the CellRange and replaces all occurences of a specific value with a new value.  
    Public MethodOverridden. Searches into the content of the CellRange and replaces all instances of the SearchValues with their corresponding NewValues.  
    Public MethodReturns the addresses of the StartingElement and EndingElement in the following format: ( "SE : EE " ).  
    Public MethodRemoves all the element in the CellRange from the MergedCellCollection.  
    Top
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also