Table — Aspose.Slides FOSS for C++ API Reference
Enumerations Table lớp đại diện cho một hình dạng bảng trên slide. Các bảng chứa các hàng và cột của các ô, mỗi ô có TextFrame.
Enumerations: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/table.h>class TableEnumerations: include/Aspose/Slides/Foss/table.h
Các lớp liên quan
Enumerations
Được định nghĩa trong include/Aspose/Slides/Foss/row.h. Các thành viên chính:
| Enumerations | Enumerations |
|---|---|
cells() | Trả về ICellCollection cho hàng này. |
row_format() | Cài đặt định dạng hàng. |
Enumerations
Được định nghĩa trong include/Aspose/Slides/Foss/column.h. Các thành viên chính:
| Enumerations | Enumerations |
|---|---|
cells() | Trả về ICellCollection cho cột này. |
column_format() | Cài đặt định dạng cột. |
Enumerations
Được định nghĩa trong include/Aspose/Slides/Foss/cell.h. Các thành viên chính:
| Enumerations | Enumerations | Enumerations |
|---|---|---|
text_frame() | Enumerations | TextFrame chứa văn bản ô. |
cell_format() | Enumerations | Định dạng viền và tô màu ô. |
text_vertical_type() | Enumerations | Định hướng văn bản dọc. |
text_anchor_type() | Enumerations | Căn văn bản trong ô. |
RowCollection / ColumnCollection
Các collections có thể lặp lại với các phương thức:
| Enumerations | Enumerations |
|---|---|
size() | Số hàng/cột. |
add_clone(...) | Sao chép và thêm một hàng/cột. |
insert_clone(...) | Sao chép và chèn vào vị trí. |
remove_at(int index) | Xóa tại chỉ mục. |
begin() / end() | Hỗ trợ iterator. |
Ví dụ sử dụng
#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;
// }