Xamarin.iOS

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface ITable - Xamarin.iOS API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface ITable

    Represents the table in a slide.

    Inherited Members
    ISlideItem.Clone()
    ISlideItem.Description
    ISlideItem.SlideItemType
    ISlideItem.Height
    ISlideItem.Hidden
    ISlideItem.Left
    ISlideItem.LineFormat
    ISlideItem.ShapeName
    ISlideItem.Title
    ISlideItem.Top
    ISlideItem.Width
    Namespace: Syncfusion.Presentation
    Assembly: Syncfusion.Presentation.Portable.dll
    Syntax
    public interface ITable : ISlideItem

    Properties

    BuiltInStyle

    Gets or sets a BuiltInTableStyle instance that represents the table style.

    Declaration
    BuiltInTableStyle BuiltInStyle { get; set; }
    Property Value
    Type Description
    BuiltInTableStyle

    The built in style.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);           
    //Get the row collection from the table, it is read only
    IRows rows = table.Rows;
    //Set the text content for specific cell in a row
    rows[0].Cells[0].TextBody.AddParagraph("Row - 1, Column - 1");
    //Set the builtin style for the table
    table.BuiltInStyle = BuiltInTableStyle.MediumStyle2Accent6;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Get the row collection from the table, it is read only
    Dim rows As IRows = table.Rows
    'Set the text content for specific cell in a row
    rows(0).Cells(0).TextBody.AddParagraph("Row - 1, Column - 1")
    'Set the builtin style for the table
    table.BuiltInStyle = BuiltInTableStyle.MediumStyle2Accent6
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    Columns

    Gets an IColumns instance that represents the column collection. Read-only.

    Declaration
    IColumns Columns { get; }
    Property Value
    Type Description
    IColumns

    The columns.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);           
    //Get the row collection from the table, it is read only
    IColumns columns = table.Columns;
    //Set the text content for specific cell in a column
    columns[0].Cells[0].TextBody.AddParagraph("Column - 1, Row - 1");
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Get the row collection from the table, it is read only
    Dim columns As IColumns = table.Columns
    'Set the text content for specific cell in a column
    columns(0).Cells(0).TextBody.AddParagraph("Column - 1, Row - 1")
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    ColumnsCount

    Gets the total number of columns in the table.

    Declaration
    int ColumnsCount { get; }
    Property Value
    Type Description
    System.Int32
    Examples
    //Create instance of PowerPoint presentation
    IPresentation presDoc = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presDoc.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Get the total number of columns in the table
    int columnsCount = table.ColumnsCount;
    //Save the presentation
    presDoc.Save("Sample.pptx");
    //Close the presentation
    presDoc.Close();

    ///

    Dim presDoc As IPresentation = Presentation.Create()
    ‘Add slide to the presentation
    Dim slide As ISlide = presDoc.Slides.Add(SlideLayoutType.Blank)
    ‘Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    ‘Get the total number of columns in the table
    Dim columnsCount As Integer = table.ColumnsCount
    ‘Save the presentation
    presDoc.Save("Sample.pptx")
    ‘Close the presentation
    presDoc.Close()
    ///

    HasBandedColumns

    Gets or sets a boolean value indicates whether to display banded columns, in which even columns are formatted differently from odd columns.

    Declaration
    bool HasBandedColumns { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has banded columns; otherwise, false.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");
    //Set vertical banding for the table
    table.HasBandedColumns = true;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Set vertical banding for the table
    table.HasBandedColumns = True
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    HasBandedRows

    Gets or sets a boolean value indicates whether to display banded rows, in which even rows are formatted differently from odd rows.

    Declaration
    bool HasBandedRows { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has banded rows; otherwise, false.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");
    //Set horizontal banding for the table
    table.HasBandedRows = true;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Set horizontal banding for the table
    table.HasBandedRows = True
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    HasFirstColumn

    Gets or sets a boolean value indicates whether to display special formatting for the first column.

    Declaration
    bool HasFirstColumn { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has first column; otherwise, false.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");
    //Set the table has first column
    table.HasFirstColumn = true;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Set the table has first column
    table.HasFirstColumn = True
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    HasHeaderRow

    Gets or sets a boolean value indicates whether to display special formatting for the first row.

    Declaration
    bool HasHeaderRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has header row; otherwise, false.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");
    //Set the header row
    table.HasHeaderRow = true;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Set the table has header row
    table.HasHeaderRow = True
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    HasLastColumn

    Gets or sets a boolean value indicates whether to display special formatting for the last column.

    Declaration
    bool HasLastColumn { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has last column; otherwise, false.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");
    //Set the last column
    table.HasLastColumn = true;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Set the table has last column
    table.HasLastColumn = True
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    HasTotalRow

    Gets or sets a boolean value indicates whether to display special formatting for the last row of the specified table.

    Declaration
    bool HasTotalRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has total row; otherwise, false.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");
    //Set the total row
    table.HasTotalRow = true;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Set the table has total row
    table.HasTotalRow = True
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    Item[Int32, Int32]

    Gets a single ICell instance from the table. Read-only.

    Declaration
    ICell this[int rowIndex, int columnIndex] { get; }
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Determines the row index.

    System.Int32 columnIndex

    Determines the column index.

    Property Value
    Type Description
    ICell

    Returns an ICell instance.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Retrieve each cell and fill text content to the cell, it is read only
    ICell cell = table[0, 0];
    cell.TextBody.AddParagraph("First Row and First Column");
    cell = table[0, 1];
    cell.TextBody.AddParagraph("First Row and Second Column");
    cell = table[1, 0];
    cell.TextBody.AddParagraph("Second Row and First Column");
    cell = table[1, 1];
    cell.TextBody.AddParagraph("Second Row and Second Column");      
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Retrieve each cell and fill text content to the cell, it is read only
    Dim cell As ICell = table(0, 0)
    cell.TextBody.AddParagraph("First Row and First Column")
    cell = table(0, 1)
    cell.TextBody.AddParagraph("First Row and Second Column")
    cell = table(1, 0)
    cell.TextBody.AddParagraph("Second Row and First Column")
    cell = table(1, 1)
    cell.TextBody.AddParagraph("Second Row and Second Column")
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    Rows

    Gets an IRows instance that represents the row collection. Read-only.

    Declaration
    IRows Rows { get; }
    Property Value
    Type Description
    IRows

    The rows.

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presentation = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);           
    //Get the row collection from the table, it is read only
    IRows rows = table.Rows;
    //Set the text content for specific cell in a row
    rows[0].Cells[0].TextBody.AddParagraph("Row - 1, Column - 1");
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create instance of PowerPoint presentation
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add slide to the presentation
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    'Get the row collection from the table, it is read only
    Dim rows As IRows = table.Rows
    'Set the text content for specific cell in a row
    rows(0).Cells(0).TextBody.AddParagraph("Row - 1, Column - 1")
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    Methods

    InsertColumn(Int32)

    Inserts the column at the specified index position of the table

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

    The index position to insert the column

    Examples
    //Create instance of PowerPoint presentation
    IPresentation presDoc = Presentation.Create();
    //Add slide to the presentation
    ISlide slide = presDoc.Slides.Add(SlideLayoutType.Blank);
    //Add table to the slide
    ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
    //Insert the column at the specified index position
    table.InsertColumn(1);
    //Save the presentation
    presDoc.Save("Sample.pptx");
    //Close the presentation
    presDoc.Close();
    Dim presDoc As IPresentation = Presentation.Create()
    ‘Add slide to the presentation
    Dim slide As ISlide = presDoc.Slides.Add(SlideLayoutType.Blank)
    ‘Add table to the slide
    Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
    ‘Insert the column at the specified index position
    table.InsertColumn(1);
    ‘Save the presentation
    presDoc.Save("Sample.pptx")
    ‘Close the presentation
    presDoc.Close()
    ///
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved