Interface ICells
Represents a collection of ICell objects in a table.
Inherited Members
System.Collections.Generic.IEnumerable<Syncfusion.Presentation.ICell>.GetEnumerator()
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface ICells : IEnumerable<ICell>, IEnumerable
Properties
Count
Gets the number of cells in the row or column. Read-only.
Declaration
int Count { get; }
Property Value
Type |
---|
System.Int32 |
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(3, 3, 100, 120, 300, 200);
//Create instance to hold the cell collection from the table
ICells cells = table.Rows[0].Cells;
//Get the count of cells, read only
int count = cells.Count;
//Save the presentation
presentation.Save("Cells.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(3, 3, 100, 120, 300, 200)
'Create instance to hold the cell collection from the table
Dim cells As ICells = table.Rows(0).Cells
'Get the count of cells, read only
Dim count As Integer = cells.Count
'Save the presentation
presentation__1.Save("Cells.pptx")
'Close the presentation
presentation__1.Close()
Item[Int32]
Gets a ICell instance at the specified index from the row or column. Read-only.
Declaration
ICell this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element. |
Property Value
Type | Description |
---|---|
ICell | Returns the cell at the particular index if found otherwise -1. |
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(3, 3, 100, 120, 300, 200);
//Create instance to hold the cell collection from the table
ICells cells = table.Rows[0].Cells;
//Get the specific cell from the collection, read only
ICell cell = cells[0];
//Add text content to cell
cell.TextBody.AddParagraph("First row, first cell");
//Save the presentation
presentation.Save("Cells.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(3, 3, 100, 120, 300, 200)
'Create instance to hold the cell collection from the table
Dim cells As ICells = table.Rows(0).Cells
'Get the specific cell from the collection, read only
Dim cell As ICell = cells(0)
'Add text content to cell
cell.TextBody.AddParagraph("First row, first cell")
'Save the presentation
presentation__1.Save("Cells.pptx")
'Close the presentation
presentation__1.Close()