Struct NumberingFormat

Source
pub struct NumberingFormat { /* private fields */ }

Implementations§

Source§

impl NumberingFormat

Source

pub const FORMAT_GENERAL: &'static str = "General"

Source

pub const FORMAT_TEXT: &'static str = "@"

Source

pub const FORMAT_NUMBER: &'static str = "0"

Source

pub const FORMAT_NUMBER_00: &'static str = "0.00"

Source

pub const FORMAT_NUMBER_COMMA_SEPARATED1: &'static str = "#,##0.00"

Source

pub const FORMAT_NUMBER_COMMA_SEPARATED2: &'static str = "#,##0.00_-"

Source

pub const FORMAT_PERCENTAGE: &'static str = "0%"

Source

pub const FORMAT_PERCENTAGE_00: &'static str = "0.00%"

Source

pub const FORMAT_DATE_YYYYMMDD2: &'static str = "yyyy-mm-dd"

Source

pub const FORMAT_DATE_YYYYMMDD: &'static str = "yyyy-mm-dd"

Source

pub const FORMAT_DATE_DDMMYYYY: &'static str = "dd-mm-yyyy"

Source

pub const FORMAT_DATE_DDMMYYYYSLASH: &'static str = "dd/mm/yyyy"

Source

pub const FORMAT_DATE_DMYSLASH: &'static str = "d/m/yy"

Source

pub const FORMAT_DATE_DMYMINUS: &'static str = "d-m-yy"

Source

pub const FORMAT_DATE_DMMINUS: &'static str = "d-m"

Source

pub const FORMAT_DATE_MYMINUS: &'static str = "m-yy"

Source

pub const FORMAT_DATE_XLSX14: &'static str = "mm-dd-yy"

Source

pub const FORMAT_DATE_XLSX15: &'static str = "d-mmm-yy"

Source

pub const FORMAT_DATE_XLSX16: &'static str = "d-mmm"

Source

pub const FORMAT_DATE_XLSX17: &'static str = "mmm-yy"

Source

pub const FORMAT_DATE_XLSX22: &'static str = "m/d/yy h:mm"

Source

pub const FORMAT_DATE_DATETIME: &'static str = "d/m/yy h:mm"

Source

pub const FORMAT_DATE_TIME1: &'static str = "h:mm AM/PM"

Source

pub const FORMAT_DATE_TIME2: &'static str = "h:mm:ss AM/PM"

Source

pub const FORMAT_DATE_TIME3: &'static str = "h:mm"

Source

pub const FORMAT_DATE_TIME4: &'static str = "h:mm:ss"

Source

pub const FORMAT_DATE_TIME5: &'static str = "mm:ss"

Source

pub const FORMAT_DATE_TIME6: &'static str = "h:mm:ss"

Source

pub const FORMAT_DATE_TIME8: &'static str = "h:mm:ss;@"

Source

pub const FORMAT_DATE_YYYYMMDDSLASH: &'static str = "yyyy/mm/dd;@"

Source

pub const FORMAT_CURRENCY_USD_SIMPLE: &'static str = r##""$"#,##0.00_-"##

Source

pub const FORMAT_CURRENCY_USD: &'static str = r###"$#,##0_-"###

Source

pub const FORMAT_CURRENCY_EUR_SIMPLE: &'static str = r#"#,##0.00_-"€""#

Source

pub const FORMAT_CURRENCY_EUR: &'static str = r#"#,##0_-"€""#

Source

pub const FORMAT_ACCOUNTING_USD: &'static str = r#"_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)"#

Source

pub const FORMAT_ACCOUNTING_EUR: &'static str = r#"_("€"* #,##0.00_);_("€"* \(#,##0.00\);_("€"* "-"??_);_(@_)"#

Source

pub fn get_number_format_id(&self) -> &u32

Source

pub fn set_number_format_id(&mut self, value: u32) -> &mut Self

Source

pub fn set_format_code<S: Into<String>>(&mut self, value: S) -> &mut Self

Set the format code.

§Arguments
  • value - format code. (umya_spreadsheet::NumberingFormat)
§Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(&0).unwrap();
let _ = worksheet.get_style_mut("C30")
.get_number_format_mut()
.set_format_code(umya_spreadsheet::NumberingFormat::FORMAT_DATE_XLSX17);
Source

pub fn get_format_code(&self) -> &str

Trait Implementations§

Source§

impl Clone for NumberingFormat

Source§

fn clone(&self) -> NumberingFormat

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for NumberingFormat

Source§

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

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

impl Default for NumberingFormat

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Ord for NumberingFormat

Source§

fn cmp(&self, other: &NumberingFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for NumberingFormat

Source§

fn eq(&self, other: &NumberingFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for NumberingFormat

Source§

fn partial_cmp(&self, other: &NumberingFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Eq for NumberingFormat

Source§

impl StructuralPartialEq for NumberingFormat

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.