Table — Aspose.Slides FOSS for C++ API Reference

Properties Table คลาสแสดงรูปแบบตารางบนสไลด์ ตารางประกอบด้วยแถวและคอลัมน์ของเซลล์ แต่ละเซลล์มีของตนเอง TextFrame.

Properties: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/table.h>
class Table

Properties: include/Aspose/Slides/Foss/table.h


คลาสที่เกี่ยวข้อง

Properties

กำหนดใน include/Aspose/Slides/Foss/row.h. สมาชิกสำคัญ:

PropertiesProperties
cells()คืนค่า ICellCollection สำหรับแถวนี้.
row_format()การตั้งค่ารูปแบบแถว.

Properties

กำหนดใน include/Aspose/Slides/Foss/column.h. สมาชิกสำคัญ:

PropertiesProperties
cells()คืนค่า ICellCollection สำหรับคอลัมน์นี้.
column_format()การตั้งค่ารูปแบบคอลัมน์.

Properties

กำหนดใน include/Aspose/Slides/Foss/cell.h. สมาชิกสำคัญ:

PropertiesPropertiesProperties
text_frame()PropertiesTextFrame ที่มีข้อความในเซลล์.
cell_format()Propertiesรูปแบบเส้นขอบและการเติมของเซลล์.
text_vertical_type()Propertiesการจัดแนวข้อความแนวตั้ง.
text_anchor_type()Propertiesการยึดข้อความภายในเซลล์.

RowCollection / ColumnCollection

คอลเลกชันที่สามารถวนซ้ำได้พร้อมเมธอด:

PropertiesProperties
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;
// }

ดูเพิ่มเติม

 ภาษาไทย