Table — Aspose.Slides FOSS for C++ API Reference
Properties Table 类表示幻灯片上的表格形状。表格包含行和列的单元格,每个单元格都有自己的 TextFrame.
Properties: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/table.h>class TableProperties: include/Aspose/Slides/Foss/table.h
相关类
Properties
定义于 include/Aspose/Slides/Foss/row.h.。关键成员::
| Properties | Properties |
|---|---|
cells() | 返回 ICellCollection 此行的. |
row_format() | 行格式设置。. |
Properties
定义于 include/Aspose/Slides/Foss/column.h.。关键成员::
| Properties | Properties |
|---|---|
cells() | 返回 ICellCollection 此列的. |
column_format() | 列格式设置。. |
Properties
定义于 include/Aspose/Slides/Foss/cell.h.。关键成员::
| Properties | Properties | Properties |
|---|---|---|
text_frame() | Properties | TextFrame 包含单元格文本。. |
cell_format() | Properties | 单元格边框和填充格式。. |
text_vertical_type() | Properties | 垂直文本方向。. |
text_anchor_type() | Properties | 单元格内的文本锚定。. |
RowCollection / ColumnCollection
可迭代集合,具有以下方法::
| Properties | Properties |
|---|---|
size() | 行/列的数量。. |
add_clone(...) | 克隆并追加行/列。. |
insert_clone(...) | 克隆并插入到指定位置。. |
remove_at(int index) | 在索引处删除。. |
begin() / end() | 迭代器支持。. |
使用示例
#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;
// }