Search Results for

    Show / Hide Table of Contents

    Class MergeCell

    Represents a range of cells that are merged into a single cell.

    Inheritance
    System.Object
    MergeCell
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class MergeCell : Object

    When two or more table cells should read as one, a MergeCell records the rectangular block they span. It captures the corner coordinates of a merge so a table can present a single combined cell, the pattern behind a header that stretches across columns or a label that runs down several rows.

    A merge is defined by four zero-based coordinates: StartRow and StartColumn mark the top-left cell of the block, and EndRow and EndColumn mark the bottom-right. The range between those corners becomes the merged region. In practice you do not build the geometry by hand for every case; a Table exposes MergeCells, which takes the same start-row, start-column, end-row, and end-column arguments and performs the merge, while the table's MergedCells property lists the MergeCell records already applied. Reading that list tells you which regions of an existing table are combined.

    Set the four coordinates to cover the block you want, keeping the start corner above and to the left of the end corner, then let the table apply it. Because the values are zero-based, the first row and first column are index 0, so a header spanning the first three columns of the top row runs from (0, 0) to (0, 2). Once merged, the cells behave as the single cell at the start corner, which is where content for the region is read and written through GetCell. The cells absorbed into the block no longer hold their own content, so populate the start cell after the merge rather than before. A table can carry several merges at once, each its own MergeCell record, which is how a layout combines a banner row and a stacked label column in the same grid.

    table.MergeCells(0, 0, 0, 2);

    The add table example builds a table, the add table how-to walks through cells and layout in detail, and the document element tutorial places tables within a document.

    Constructors

    MergeCell()

    Declaration
    public MergeCell()

    Properties

    EndColumn

    Gets or sets the ending column index of the merged cell.

    Declaration
    public int EndColumn { get; set; }
    Property Value
    Type Description
    System.Int32

    EndRow

    Gets or sets the ending row index of the merged cell.

    Declaration
    public int EndRow { get; set; }
    Property Value
    Type Description
    System.Int32

    StartColumn

    Gets or sets the starting column index of the merged cell.

    Declaration
    public int StartColumn { get; set; }
    Property Value
    Type Description
    System.Int32

    StartRow

    Gets or sets the starting row index of the merged cell.

    Declaration
    public int StartRow { get; set; }
    Property Value
    Type Description
    System.Int32
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    %s requires a valid license key for further deployment. Get Trial Below.
    ironsuite
    Blue key in circleGet Started for Free
    30 days full access • No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet Started for Free
    The trial form was submitted successfully.
    Grey check in circleTrial key delivered
    Your key has been issued and sent to your email.
    Calendar in circleBook Free Live Demo
    No cards • no pitches • no commitments Pick a time for a quick, personalized demo
    Get the most out of your 30-day trial with:

    Live product and key features walk-through

    Project-specific recommendations

    All your questions answered

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation

    Want to deploy Iron Suite
    to a live project for FREE?

    What’s included?

    • Test in production without watermarks
    • 30 days fully functional product
    • 24/5 technical support during trial
    ironpdf Logo
    ironword Logo
    ironxl Logo
    ironppt Logo
    ironocr Logo
    ironbarcode Logo
    ironqr Logo
    ironprint Logo
    ironzip Logo
    ironwebscraper Logo
    Iron Software sales team
    Online 24/5
    Have Enterprise licensing requirements?
    Request Iron Suite Enterprise trial
    Key in blue circle

    Get your free 30-day Trial Key instantly

    Your trial license will be sent to your email address

    No limitations. 100% unlocked. No credit card.

    bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Or
    Key in blue circle

    Complete Your Trial Key Signup

    Tell us a little more about yourself.

    Key in blue circleNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Key in blue circle

    Your license key has been delivered to your inbox

    Can't find it? Check your spam folder.

    What’s next?
    Install with NuGet
    Add IronWord to your project
    Quickstart Guide
    Helpful resources to get started

    Need help getting started?

    Book a Free Live Demo

    See IronWord in action and get your licensing questions answered, or

    Key in blue circle

    Your demo request is in.

    You'll receive an invite via email shortly.

    What’s next?
    Explore Documentation
    Review Licensing Options
    badge_greencheck_in_yellowcircle
    Thank you
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronWord
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com