Struct edit_xlsx::Properties

source ·
pub struct Properties<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Properties<'a>

source

pub fn set_title(&mut self, title: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 7)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_subject(&mut self, subject: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 8)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_author(&mut self, author: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 9)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_manager(&mut self, manager: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 10)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_company(&mut self, company: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 11)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_category(&mut self, category: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 12)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_keywords(&mut self, keywords: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 13)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_comments(&mut self, comments: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 14)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}
source

pub fn set_status(&mut self, status: &'a str) -> &mut Self

Examples found in repository?
examples/doc_properties.rs (line 15)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn main() -> WorkbookResult<()> {
    // Create a new workbook
    let mut workbook = Workbook::new();
    let mut properties = Properties::default();
    properties.set_title("This is an example spreadsheet")
        .set_subject("With document properties")
        .set_author("pt")
        .set_manager("example manager")
        .set_company("example company")
        .set_category("Example spreadsheets")
        .set_keywords("Sample, Example, Properties")
        .set_comments("Created with Rust")
        .set_status("example status");
    workbook.set_properties(&properties)?;
    // Use the default worksheet
    let worksheet = workbook.get_worksheet(1)?;
    worksheet.set_column("A:A", 70.0)?;
    worksheet.write("A1", "Select 'Workbook Properties' to see properties.")?;
    workbook.save_as("examples/doc_properties.xlsx")?;
    Ok(())
}

Trait Implementations§

source§

impl<'a> Default for Properties<'a>

source§

fn default() -> Properties<'a>

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

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Properties<'a>

§

impl<'a> Send for Properties<'a>

§

impl<'a> Sync for Properties<'a>

§

impl<'a> Unpin for Properties<'a>

§

impl<'a> UnwindSafe for Properties<'a>

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> 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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.