Struct xlsxwriter::Workbook[][src]

pub struct Workbook { /* fields omitted */ }

The Workbook is the main object exposed by the libxlsxwriter library. It represents the entire spreadsheet as you see it in Excel and internally it represents the Excel file as it is written on disk.

use xlsxwriter::*;
fn main() -> Result<(), XlsxError> {
    let workbook = Workbook::new("test-workbook.xlsx");
    let mut worksheet = workbook.add_worksheet(None)?;
    worksheet.write_string(0, 0, "Hello Excel", None)?;
    workbook.close()
}

Implementations

impl Workbook[src]

pub fn new(filename: &str) -> Workbook[src]

pub fn add_worksheet<'a>(
    &'a self,
    sheet_name: Option<&str>
) -> Result<Worksheet<'a>, XlsxError>
[src]

pub fn get_worksheet<'a>(&'a self, sheet_name: &str) -> Option<Worksheet<'a>>[src]

pub fn add_format(&self) -> Format<'_>[src]

pub fn add_chart(&self, chart_type: ChartType) -> Chart<'_>[src]

pub fn close(self) -> Result<(), XlsxError>[src]

Trait Implementations

impl Drop for Workbook[src]

Auto Trait Implementations

impl !RefUnwindSafe for Workbook

impl !Send for Workbook

impl !Sync for Workbook

impl Unpin for Workbook

impl !UnwindSafe for Workbook

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.