Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MergeCellsImpl

    Show / Hide Table of Contents

    Class MergeCellsImpl

    This class contains information about all merged cells in the parent workbook.

    Inheritance
    System.Object
    CommonObject
    MergeCellsImpl
    Implements
    IParentApplication
    System.IDisposable
    ICloneParent
    Inherited Members
    CommonObject.m_bIsDisposed
    CommonObject.Finalize()
    CommonObject.FindParent(Type)
    CommonObject.FindParent(Type, Boolean)
    CommonObject.FindParent(Object, Type)
    CommonObject.FindParent(Object, Type, Boolean)
    CommonObject.FindParents(Type[])
    CommonObject.FindParent(Type[])
    CommonObject.SetParent(Object)
    CommonObject.CheckDisposed()
    CommonObject.AddReference()
    CommonObject.ReleaseReference()
    CommonObject.Dispose()
    CommonObject.OnDispose()
    CommonObject.Application
    CommonObject.Parent
    CommonObject.AppImplementation
    CommonObject.ReferenceCount
    Namespace: Syncfusion.XlsIO.Implementation
    Assembly: Syncfusion.XlsIO.Portable.dll
    Syntax
    public class MergeCellsImpl : CommonObject, IParentApplication, IDisposable, ICloneParent

    Constructors

    MergeCellsImpl(IApplication, Object)

    Sets application and parent fields.

    Declaration
    public MergeCellsImpl(IApplication application, object parent)
    Parameters
    Type Name Description
    IApplication application

    Application object for the new instance.

    System.Object parent

    Parent object for the new instance.

    Methods

    AddCache(List<MergeCellsRecord.MergedRegion>, Int32, Int32)

    Adds cache into collection.

    Declaration
    public void AddCache(List<MergeCellsRecord.MergedRegion> lstRegions, int iRowDelta, int iColDelta)
    Parameters
    Type Name Description
    System.Collections.Generic.List<MergeCellsRecord.MergedRegion> lstRegions

    List with merge regions to add.

    System.Int32 iRowDelta

    Row delta.

    System.Int32 iColDelta

    Column delta.

    AddMerge(RangeImpl, ExcelMergeOperation)

    Adds new merge to the existing merges.

    Declaration
    public void AddMerge(RangeImpl range, ExcelMergeOperation operation)
    Parameters
    Type Name Description
    RangeImpl range

    Range that should be merged.

    ExcelMergeOperation operation

    Operation type - Information on what needs to be done if some of the cells are already merged.

    AddMerge(MergeCellsRecord)

    Adds merge regions from the MergeCellsRecord.

    Declaration
    public void AddMerge(MergeCellsRecord mergeRecord)
    Parameters
    Type Name Description
    MergeCellsRecord mergeRecord

    Record with regions.

    AddMerge(Int32, Int32, Int32, Int32, ExcelMergeOperation)

    Adds new region if it intersects with other regions.

    Declaration
    public void AddMerge(int RowFrom, int RowTo, int ColFrom, int ColTo, ExcelMergeOperation operation)
    Parameters
    Type Name Description
    System.Int32 RowFrom

    First row to merge. Zero-based.

    System.Int32 RowTo

    Last row to merge. Zero-based.

    System.Int32 ColFrom

    First column to merge. Zero-based.

    System.Int32 ColTo

    Last column to merge. Zero-based.

    ExcelMergeOperation operation

    Operation type - tells what should be done if some of the cells are already merged.

    AddMerges(IDictionary, Int32, Int32)

    Adds dictionary with that describes merge region to the collection.

    Declaration
    public void AddMerges(IDictionary dictMerges, int iRowDelta, int iColumnDelta)
    Parameters
    Type Name Description
    System.Collections.IDictionary dictMerges

    Regions to add, key - top-left cell index, value - bottom-right cell index.

    System.Int32 iRowDelta

    Row delta.

    System.Int32 iColumnDelta

    Column delta.

    CacheMerges(IRange, List<MergeCellsRecord.MergedRegion>)

    Caches range's merges.

    Declaration
    public void CacheMerges(IRange range, List<MergeCellsRecord.MergedRegion> lstRegions)
    Parameters
    Type Name Description
    IRange range

    Range for which we have to cache merged regions.

    System.Collections.Generic.List<MergeCellsRecord.MergedRegion> lstRegions

    List to save merges in.

    Clear()

    Clear all merges.

    Declaration
    public void Clear()

    Clone(Object)

    Creates a copy of the current object.

    Declaration
    public object Clone(object parent)
    Parameters
    Type Name Description
    System.Object parent

    Parent object for the new object.

    Returns
    Type Description
    System.Object

    A copy of the current object.

    CopyMoveMerges(IRange, IRange, Boolean)

    Moves merges from source range into destination.

    Declaration
    public void CopyMoveMerges(IRange destination, IRange source, bool bIsMove)
    Parameters
    Type Name Description
    IRange destination

    Destination range.

    IRange source

    Source range.

    System.Boolean bIsMove

    Indicates whether we are moving merges (true) or copying (false).

    DeleteMerge(Rectangle)

    Removes merge that contains a specific cell.

    Declaration
    public void DeleteMerge(Rectangle range)
    Parameters
    Type Name Description
    Rectangle range

    Range of the cells to be removed.

    FindMergedRegion(Rectangle)

    Finds merged region for specific cell.

    Declaration
    public MergeCellsRecord.MergedRegion FindMergedRegion(Rectangle rectangle)
    Parameters
    Type Name Description
    Rectangle rectangle

    Cell range address.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Merged region that includes specified cell.

    FindMergesToCopyMove(IRange, Boolean)

    Finds all merged ranges for specific range.

    Declaration
    public List<MergeCellsRecord.MergedRegion> FindMergesToCopyMove(IRange range, bool bIsMove)
    Parameters
    Type Name Description
    IRange range

    Range to find merges in.

    System.Boolean bIsMove

    Indicates whether delete merges from the collection is needed or not.

    Returns
    Type Description
    System.Collections.Generic.List<MergeCellsRecord.MergedRegion>

    Merges list.

    GetFormat(MergeCellsRecord.MergedRegion)

    Gets extended format describing region.

    Declaration
    public ExtendedFormatImpl GetFormat(MergeCellsRecord.MergedRegion region)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to get format for.

    Returns
    Type Description
    ExtendedFormatImpl

    Extended format describing region.

    GetLeftTopCell(Rectangle)

    Finds left top cell of merged region.

    Declaration
    public Rectangle GetLeftTopCell(Rectangle rect)
    Parameters
    Type Name Description
    Rectangle rect

    Merged region rectangle.

    Returns
    Type Description
    Rectangle

    Left top cell range.

    GetMergedExtendedFormats()

    Gets array of custom extended formats that represents custom merged range.

    Declaration
    public IList<ExtendedFormatImpl> GetMergedExtendedFormats()
    Returns
    Type Description
    System.Collections.Generic.IList<ExtendedFormatImpl>

    Returns array of Merged extended formats.

    InsertColumn(Int32)

    Inserts column into collection.

    Declaration
    public void InsertColumn(int iColumnIndex)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    InsertColumn(Int32, Int32)

    Inserts column into collection

    Declaration
    public void InsertColumn(int iColumnIndex, int iColumnCount)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    Column index to insert.

    System.Int32 iColumnCount

    Number of columns to insert.

    InsertRemoveColumn(MergeCellsRecord.MergedRegion, Int32, Boolean, Int32, IWorkbook)

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveColumn(MergeCellsRecord.MergedRegion region, int iColumnIndex, bool isRemove, int iCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove column operation.

    System.Int32 iColumnIndex

    Column index.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iCount

    Number of columns to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveColumn(Int32, Boolean, Int32)

    Removes or inserts one column from merges collection.

    Declaration
    protected void InsertRemoveColumn(int iColumnIndex, bool isRemove, int iCount)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index to remove.

    System.Boolean isRemove

    Indicates whether to remove or insert rows.

    System.Int32 iCount

    Number of columns to insert or remove.

    InsertRemoveColumnAbove(MergeCellsRecord.MergedRegion, Boolean, Int32)

    Inserts or removes column after end of the region.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveColumnAbove(MergeCellsRecord.MergedRegion region, bool isRemove, int iCount)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove column operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iCount

    Number of columns to insert.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveColumnLower(MergeCellsRecord.MergedRegion, Boolean, Int32, Int32, IWorkbook)

    Inserts or removes column into the merge region before first column.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveColumnLower(MergeCellsRecord.MergedRegion region, bool isRemove, int iColumnIndex, int iCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove column operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iColumnIndex

    Column index.

    System.Int32 iCount

    Number of columns to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveColumnMiddleEnd(MergeCellsRecord.MergedRegion, Boolean, Int32, Int32, IWorkbook)

    Inserts or removes column into the merge region in the middle or at the end of the range.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveColumnMiddleEnd(MergeCellsRecord.MergedRegion region, bool isRemove, int iColumnIndex, int iCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove column operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iColumnIndex

    Column index.

    System.Int32 iCount

    Number of columns to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveColumnStart(MergeCellsRecord.MergedRegion, Boolean, Int32, IWorkbook)

    Inserts or removes column into the merge region at the first column.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveColumnStart(MergeCellsRecord.MergedRegion region, bool isRemove, int iCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove column operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iCount

    Number of columns to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveRow(MergeCellsRecord.MergedRegion, Int32, Boolean, Int32, IWorkbook)

    Inserts or removes row.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveRow(MergeCellsRecord.MergedRegion region, int iRowIndex, bool isRemove, int iRowCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove row operation.

    System.Int32 iRowIndex

    Row index.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iRowCount

    Number of rows to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    InsertRemoveRow(Int32, Boolean, Int32)

    Removes or inserts one row from merges collection.

    Declaration
    protected void InsertRemoveRow(int iRowIndex, bool isRemove, int iRowCount)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    One-based row index to remove or insert.

    System.Boolean isRemove

    Indicates whether to remove or insert rows.

    System.Int32 iRowCount

    Count of row to remove.

    InsertRemoveRowAbove(MergeCellsRecord.MergedRegion, Boolean, Int32)

    Inserts or removes row after end of the region.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveRowAbove(MergeCellsRecord.MergedRegion region, bool isRemove, int iRowCount)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove row operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iRowCount

    Number of rows to insert.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveRowLower(MergeCellsRecord.MergedRegion, Boolean, Int32, Int32, IWorkbook)

    Inserts or removes row into the merge region before first row.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveRowLower(MergeCellsRecord.MergedRegion region, bool isRemove, int iRowIndex, int iRowCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove row operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iRowIndex

    Row index.

    System.Int32 iRowCount

    Number of rows to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveRowMiddleEnd(MergeCellsRecord.MergedRegion, Boolean, Int32, Int32, IWorkbook)

    Inserts or removes row into the merge region in the middle or at the end of the range.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveRowMiddleEnd(MergeCellsRecord.MergedRegion region, bool isRemove, int iRowIndex, int iRowCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove row operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iRowIndex

    Row index.

    System.Int32 iRowCount

    Number of rows to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRemoveRowStart(MergeCellsRecord.MergedRegion, Boolean, Int32, IWorkbook)

    Inserts or removes row into region the merge at the first row.

    Declaration
    public static MergeCellsRecord.MergedRegion InsertRemoveRowStart(MergeCellsRecord.MergedRegion region, bool isRemove, int iRowCount, IWorkbook book)
    Parameters
    Type Name Description
    MergeCellsRecord.MergedRegion region

    Region to modify after insert/remove row operation.

    System.Boolean isRemove

    Indicates whether it is remove operation.

    System.Int32 iRowCount

    Number of rows to insert.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Modified region.

    InsertRow(Int32, Int32)

    Inserts row to the collection.

    Declaration
    public void InsertRow(int iRowIndex, int iRowCount)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    Row index to insert.

    System.Int32 iRowCount

    Number of row to insert.

    NormalizeColumn(Int32, IWorkbook)

    Ensures that column index is in correct range.

    Declaration
    public static int NormalizeColumn(int iColumnIndex, IWorkbook book)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    Column index to check.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    System.Int32

    Column index from the correct range.

    NormalizeRow(Int32, IWorkbook)

    Ensures that row index is in correct range.

    Declaration
    public static int NormalizeRow(int iRowIndex, IWorkbook book)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    Row index to check.

    IWorkbook book

    Workbook where operation is performed.

    Returns
    Type Description
    System.Int32

    Row index from the correct range.

    Parse()

    Adds merge regions from the MergeCellsRecord.

    Declaration
    public void Parse()

    RectangleToMergeRegion(Rectangle)

    Converts rectangle to merged region.

    Declaration
    public MergeCellsRecord.MergedRegion RectangleToMergeRegion(Rectangle rect)
    Parameters
    Type Name Description
    Rectangle rect

    Rectangle to convert.

    Returns
    Type Description
    MergeCellsRecord.MergedRegion

    Merged region.

    RemoveColumn(Int32)

    Removes column from the collection

    Declaration
    public void RemoveColumn(int iColumnIndex)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    Column index to remove.

    RemoveColumn(Int32, Int32)

    Removes columns from the collection.

    Declaration
    public void RemoveColumn(int index, int count)
    Parameters
    Type Name Description
    System.Int32 index

    Column index to remove.

    System.Int32 count

    Number of columns to remove

    RemoveRow(Int32)

    Removes row from the collection.

    Declaration
    public void RemoveRow(int iRowIndex)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    Row index to remove.

    RemoveRow(Int32, Int32)

    Removes row(s) from the collection.

    Declaration
    public void RemoveRow(int rowIndex, int count)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Row index to remove.

    System.Int32 count

    Number of rows to remove.

    Serialize(OffsetArrayList)

    Saves merges into OffsetArrayList.

    Declaration
    public void Serialize(OffsetArrayList records)
    Parameters
    Type Name Description
    OffsetArrayList records

    OffsetArrayList to save all records into.

    SetNewDimensions(Int32, Int32)

    Sets new dimensions - removes unnecessary items (that are out of bounds) or truncates them.

    Declaration
    public void SetNewDimensions(int newRowCount, int newColumnCount)
    Parameters
    Type Name Description
    System.Int32 newRowCount

    New maximum possible row count.

    System.Int32 newColumnCount

    New maximum possible column count.

    Implements

    IParentApplication
    System.IDisposable
    ICloneParent
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved