Search Results for

    Show / Hide Table of Contents

    Class TableColumn

    Represents a column element within a table.

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

    TableColumn is the column record a developer reads when sizing the vertical bands of a Word table. Each instance represents one column within a table and carries its width, and a Table exposes its columns so they can be inspected and adjusted. It is the type you reach for when a table needs specific column widths rather than evenly divided space.

    The column's single setting is Width, a value that controls how wide that column is rendered, measured in twips by default. Because the columns live on the parent table's Columns list, the usual pattern is to obtain a column from that list and set its Width, rather than constructing columns standalone. Add columns to a table with Table.AddColumn, then walk Table.Columns to assign each width.

    using IronWord.Models;
    
    Table table = new Table(3, 4);
    table.Columns[0].Width = 2400;

    The add a table how-to covers table layout including column sizing, and the document element tutorial shows where tables sit in the document model.

    Properties

    Width

    Column width, in millimeters

    Declaration
    public long Width { get; set; }
    Property Value
    Type Description
    System.Int64
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet