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() | การสนับสนุน Iterator. |
ตัวอย่างการใช้งาน
#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;
// }