Get Started
Documentation

GetCell

GetCell(nPos) → { ApiTableCell }

Get cell by position.

Parameters:

Name Type Description
nPos number

Returns:

Type
ApiTableCell

Example

Copy code
builder.CreateFile("pptx");
oPresentation = Api.GetPresentation();
oTable = Api.CreateTable(2, 4);
oRow = oTable.GetRow(0);
oCell = oRow.GetCell(0);
oContent = oCell.GetContent();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is a sample text in the cell of the first row.");
oContent.Push(oParagraph);
oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oSlide.AddObject(oTable);
builder.SaveFile("pptx", "GetCell.pptx");
builder.CloseFile();

Resulting document