ApiTableCell
Represents table cell
Methods
Name |
Description |
GetClassType |
Get the type of this class. |
GetContent |
Returns cell content |
SetCellBorderBottom |
Set the border which shall be displayed at the bottom of the current table cell. |
SetCellBorderLeft |
Set the border which shall be displayed at the left of the current table cell. |
SetCellBorderRight |
Set the border which shall be displayed at the right of the current table cell. |
SetCellBorderTop |
Set the border which shall be displayed at the top of the current table cell. |
SetCellMarginBottom |
Specifies the amount of space which shall be left between the bottom extent of the cell contents and the border
of a specific table cell within a table. |
SetCellMarginLeft |
Specifies the amount of space which shall be left between the left extent of the current cell contents and the
left edge border of a specific individual table cell within a table. |
SetCellMarginRight |
Specifies the amount of space which shall be left between the right extent of the current cell contents and the
right edge border of a specific individual table cell within a table. |
SetCellMarginTop |
Specifies the amount of space which shall be left between the top extent of the current cell contents and the
top edge border of a specific individual table cell within a table. |
SetShd |
Specify the shading which shall be applied to the extents of the current table cell. |
SetTextDirection |
Specify the direction of the text flow for this table cell. |
SetVerticalAlign |
Specify the vertical alignment for text within the current table cell. |
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();
oClassType = oCell.GetClassType();
oParagraph.AddText("Class type: " + oClassType);
oContent.Push(oParagraph);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(520, 64, 1));
oCell.SetCellBorderBottom(1, oFill);
oCell.SetCellBorderTop(1, oFill);
oCell.SetCellBorderLeft(1, oFill);
oCell.SetCellBorderRight(1, oFill);
oCell.SetCellMarginTop(500);
oCell.SetCellMarginLeft(1000);
oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oSlide.AddObject(oTable);
builder.SaveFile("pptx", "ApiTableCell.pptx");
builder.CloseFile();
Resulting document