Skip to main content

Worksheet

Struct Worksheet 

Source
pub struct Worksheet {
Show 40 fields pub sheet_properties: Option<Box<SheetProperties>>, pub dimension: Option<Box<SheetDimension>>, pub sheet_views: Option<Box<SheetViews>>, pub sheet_format: Option<Box<SheetFormat>>, pub cols: Vec<Columns>, pub sheet_data: Box<SheetData>, pub sheet_calc_pr: Option<Box<SheetCalcProperties>>, pub sheet_protection: Option<Box<SheetProtection>>, pub protected_ranges: Option<Box<ProtectedRanges>>, pub scenarios: Option<Box<Scenarios>>, pub auto_filter: Option<Box<AutoFilter>>, pub sort_state: Option<Box<SortState>>, pub data_consolidate: Option<Box<CTDataConsolidate>>, pub custom_sheet_views: Option<Box<CustomSheetViews>>, pub merged_cells: Option<Box<MergedCells>>, pub phonetic_pr: Option<Box<PhoneticProperties>>, pub conditional_formatting: Vec<ConditionalFormatting>, pub data_validations: Option<Box<DataValidations>>, pub hyperlinks: Option<Box<Hyperlinks>>, pub print_options: Option<Box<PrintOptions>>, pub page_margins: Option<Box<PageMargins>>, pub page_setup: Option<Box<PageSetup>>, pub header_footer: Option<Box<HeaderFooter>>, pub row_breaks: Option<Box<PageBreaks>>, pub col_breaks: Option<Box<PageBreaks>>, pub custom_properties: Option<Box<CTCustomProperties>>, pub cell_watches: Option<Box<CellWatches>>, pub ignored_errors: Option<Box<IgnoredErrors>>, pub smart_tags: Option<Box<SmartTags>>, pub drawing: Option<Box<Drawing>>, pub legacy_drawing: Option<Box<LegacyDrawing>>, pub legacy_drawing_h_f: Option<Box<LegacyDrawing>>, pub drawing_h_f: Option<Box<DrawingHeaderFooter>>, pub picture: Option<Box<SheetBackgroundPicture>>, pub ole_objects: Option<Box<OleObjects>>, pub controls: Option<Box<Controls>>, pub web_publish_items: Option<Box<WebPublishItems>>, pub table_parts: Option<Box<TableParts>>, pub extension_list: Option<Box<ExtensionList>>, pub extra_children: Vec<PositionedNode>,
}

Fields§

§sheet_properties: Option<Box<SheetProperties>>§dimension: Option<Box<SheetDimension>>§sheet_views: Option<Box<SheetViews>>§sheet_format: Option<Box<SheetFormat>>§cols: Vec<Columns>§sheet_data: Box<SheetData>§sheet_calc_pr: Option<Box<SheetCalcProperties>>§sheet_protection: Option<Box<SheetProtection>>§protected_ranges: Option<Box<ProtectedRanges>>§scenarios: Option<Box<Scenarios>>§auto_filter: Option<Box<AutoFilter>>§sort_state: Option<Box<SortState>>§data_consolidate: Option<Box<CTDataConsolidate>>§custom_sheet_views: Option<Box<CustomSheetViews>>§merged_cells: Option<Box<MergedCells>>§phonetic_pr: Option<Box<PhoneticProperties>>§conditional_formatting: Vec<ConditionalFormatting>§data_validations: Option<Box<DataValidations>>§hyperlinks: Option<Box<Hyperlinks>>§print_options: Option<Box<PrintOptions>>§page_margins: Option<Box<PageMargins>>§page_setup: Option<Box<PageSetup>>§header_footer: Option<Box<HeaderFooter>>§row_breaks: Option<Box<PageBreaks>>§col_breaks: Option<Box<PageBreaks>>§custom_properties: Option<Box<CTCustomProperties>>§cell_watches: Option<Box<CellWatches>>§ignored_errors: Option<Box<IgnoredErrors>>§smart_tags: Option<Box<SmartTags>>§drawing: Option<Box<Drawing>>§legacy_drawing: Option<Box<LegacyDrawing>>§legacy_drawing_h_f: Option<Box<LegacyDrawing>>§drawing_h_f: Option<Box<DrawingHeaderFooter>>§picture: Option<Box<SheetBackgroundPicture>>§ole_objects: Option<Box<OleObjects>>§controls: Option<Box<Controls>>§web_publish_items: Option<Box<WebPublishItems>>§table_parts: Option<Box<TableParts>>§extension_list: Option<Box<ExtensionList>>§extra_children: Vec<PositionedNode>

Unknown child elements captured for roundtrip fidelity.

Trait Implementations§

Source§

impl Clone for Worksheet

Source§

fn clone(&self) -> Worksheet

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Worksheet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Worksheet

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl FromXml for Worksheet

Source§

fn from_xml<R: BufRead>( reader: &mut Reader<R>, start_tag: &BytesStart<'_>, is_empty: bool, ) -> Result<Self, ParseError>

Parse from an XML reader positioned at the start tag. Read more
Source§

impl Serialize for Worksheet

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToXml for Worksheet

Source§

fn write_children<W: Write>( &self, writer: &mut Writer<W>, ) -> Result<(), SerializeError>

Write child elements and text content inside the element.
Source§

fn is_empty_element(&self) -> bool

Whether this element has no children (self-closing).
Source§

fn write_attrs<'a>(&self, start: BytesStart<'a>) -> BytesStart<'a>

Write attributes onto the start tag and return it.
Source§

fn write_element<W>( &self, tag: &str, writer: &mut Writer<W>, ) -> Result<(), SerializeError>
where W: Write,

Write a complete element: <tag attrs>children</tag> or <tag attrs/>.
Source§

impl WorksheetConditionalFormattingExt for Worksheet

Available on crate feature sml-styling only.
Source§

fn conditional_formattings(&self) -> &[ConditionalFormatting]

Get all conditional formatting rules on this worksheet.
Source§

impl WorksheetExt for Worksheet

Source§

fn sheet_data(&self) -> &SheetData

Get the sheet data (rows and cells).
Source§

fn row_count(&self) -> usize

Get the number of rows.
Source§

fn is_empty(&self) -> bool

Check if the worksheet is empty.
Source§

fn row(&self, row_num: u32) -> Option<&Row>

Get a row by 1-based row number.
Source§

fn cell(&self, reference: &str) -> Option<&Cell>

Get a cell by reference (e.g., “A1”, “B5”).
Source§

fn rows(&self) -> impl Iterator<Item = &Row>

Iterate over all rows.
Source§

fn has_auto_filter(&self) -> bool

Check if the worksheet has an auto-filter.
Source§

fn has_merged_cells(&self) -> bool

Check if the worksheet has merged cells.
Source§

fn has_conditional_formatting(&self) -> bool

Check if the worksheet has conditional formatting.
Source§

fn has_data_validations(&self) -> bool

Check if the worksheet has data validations.
Source§

fn has_freeze_panes(&self) -> bool

Check if the worksheet has freeze panes.
Source§

fn get_row_height(&self, row_num: u32) -> Option<f64>

Get the height of a row in points (if specified). Read more
Source§

fn get_column_width(&self, col_idx: u32) -> Option<f64>

Get the width of a column in characters (if specified). Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,