Table — Aspose.Slides FOSS for C++ API Reference
The Table class represents a table shape on a slide. Tables contain rows and columns of cells, each with its own TextFrame.
Namespace: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/table.h>class TableHeader: include/Aspose/Slides/Foss/table.h
Related Classes
Row
Defined in include/Aspose/Slides/Foss/row.h. Key members:
| Property | Description |
|---|---|
cells() | Returns the ICellCollection for this row. |
row_format() | Row format settings. |
Column
Defined in include/Aspose/Slides/Foss/column.h. Key members:
| Property | Description |
|---|---|
cells() | Returns the ICellCollection for this column. |
column_format() | Column format settings. |
Cell
Defined in include/Aspose/Slides/Foss/cell.h. Key members:
| Property | Accessor | Description |
|---|---|---|
text_frame() | Read | TextFrame containing cell text. |
cell_format() | Read | Cell border and fill format. |
text_vertical_type() | Read | Vertical text orientation. |
text_anchor_type() | Read | Text anchoring within the cell. |
RowCollection / ColumnCollection
Iterable collections with methods:
| Method | Description |
|---|---|
size() | Number of rows/columns. |
add_clone(...) | Clone and append a row/column. |
insert_clone(...) | Clone and insert at a position. |
remove_at(int index) | Remove at index. |
begin() / end() | Iterator support. |
Usage Example
#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;
Presentation prs("deck.pptx");
// Access a table shape on slide 0
// auto& table = dynamic_cast<Table&>(prs.slides()[0].shapes()[0]);
// for (auto& row : table.rows()) {
// for (auto& cell : row.cells()) {
// std::cout << cell.text_frame().text() << "\t";
// }
// std::cout << std::endl;
// }