[Root] / Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / CategoryData Class / FromCells Method / FromCells(Worksheet,Int32,Int32,Int32,Int32) Method

The Worksheet containing the targeted Row & Column Ids.

Note that this Worksheet must exist.

The Id of the first Row in the CellRange.

Note that this value must be greater or equal to 0.

The Id of the first Column in the CellRange.

Note that this value must be greater or equal ot 0.

The Id of the last Row in the CellRange.

Note that this value must be greater or equal to 0.

The Id of the last Column in the CellRange.

Note that this value must be greater or equal to 0.

Example


In This Topic
    FromCells(Worksheet,Int32,Int32,Int32,Int32) Method
    In This Topic
    Creates a CategoryData from a range identified by Row & Column Ids.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function FromCells( _
       ByVal worksheet As Worksheet, _
       ByVal startRowId As Integer, _
       ByVal startColumnId As Integer, _
       ByVal endRowId As Integer, _
       ByVal endColumnId As Integer _
    ) As CategoryData
    'Usage
     
    
    Dim worksheet As Worksheet
    Dim startRowId As Integer
    Dim startColumnId As Integer
    Dim endRowId As Integer
    Dim endColumnId As Integer
    Dim value As CategoryData
     
    value = CategoryData.FromCells(worksheet, startRowId, startColumnId, endRowId, endColumnId)

    Parameters

    worksheet

    The Worksheet containing the targeted Row & Column Ids.

    Note that this Worksheet must exist.

    startRowId

    The Id of the first Row in the CellRange.

    Note that this value must be greater or equal to 0.

    startColumnId

    The Id of the first Column in the CellRange.

    Note that this value must be greater or equal ot 0.

    endRowId

    The Id of the last Row in the CellRange.

    Note that this value must be greater or equal to 0.

    endColumnId

    The Id of the last Column in the CellRange.

    Note that this value must be greater or equal to 0.

    Return Value

    A CategoryData that will be used as a Chart.CategoryData.
    Remarks
    The given Ids must correspond either to a single Cell, a single Column or a single Row.
    Example
    lineChart.CategoryData = CategoryData.FromCells( worksheet, 1, 1, 8, 1 );
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also