pub struct Table { /* private fields */ }Expand description
A table on a slide.
Represents a table embedded via DrawingML a:tbl element inside a p:graphicFrame.
This is a thin wrapper around ooxml_dml::types::CTTable that adds the frame name.
Use the ooxml_dml::TableExt, ooxml_dml::TableRowExt, and ooxml_dml::TableCellExt
traits for convenient access to rows, cells, and text content.
Implementations§
Source§impl Table
impl Table
Sourcepub fn inner_mut(&mut self) -> &mut CTTable
pub fn inner_mut(&mut self) -> &mut CTTable
Get a mutable reference to the underlying DrawingML table.
Sourcepub fn into_inner(self) -> CTTable
pub fn into_inner(self) -> CTTable
Consume the wrapper and return the underlying DrawingML table.
Sourcepub fn rows(&self) -> &[CTTableRow]
pub fn rows(&self) -> &[CTTableRow]
Get all rows in the table.
Sourcepub fn cell(&self, row: usize, col: usize) -> Option<&CTTableCell>
pub fn cell(&self, row: usize, col: usize) -> Option<&CTTableCell>
Get a cell by row and column index (0-based).
Sourcepub fn to_text_grid(&self) -> Vec<Vec<String>>
pub fn to_text_grid(&self) -> Vec<Vec<String>>
Get all cell text as a 2D vector.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more