1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! # simple_excel_writer
//! Simple Excel Writer
//!
//! #### Install
//! Just include another `[dependencies.*]` section into your Cargo.toml:
//!
//! ```toml
//! [dependencies]
//! simple_excel_writer="*"
//! ```
//! #### Sample
//!
//! ```
//! extern crate simple_excel_writer as excel;
//! use excel::*;
//!
//! fn main() {
//!     println!("hello");
//!
//!     let mut wb = Workbook::create("/tmp/b.xlsx");
//!     let mut sheet = wb.create_sheet("Sheet2");
//!
//!     /*
//!         // set column width
//!         sheet.add_column(Column { custom_width: 1.0, width: 50.0 });
//!         sheet.add_column(Column { custom_width: 1.0, width: 50.0 });
//!         sheet.add_column(Column { custom_width: 1.0, width: 150.0 });
//!     */
//!
//!     wb.write_sheet(&mut sheet, |sheet_writer| {
//!         let mut r = Row::new();
//!         r.add_cell(1, true);
//!         r.add_cell(2, "Hello");
//!         sheet_writer.append_row(r)?;
//!         //        r.write(writer)?;
//!
//!         sheet_writer.append_empty_rows(10);
//!
//!         r = Row::new();
//!         r.add_cell(1, 3.6);
//!         r.add_cell(2, "World");
//!         r.add_cell(3, "!");
//!         sheet_writer.append_row(r)
//!         //        r.write(writer)
//!     }).expect("write excel error!");
//!
//!     wb.close().expect("close excel error!");
//! }
//! ```
//!

#![crate_name="simple_excel_writer"]
#![crate_type="rlib"]
#![crate_type="dylib"]

pub mod sheet;
pub mod workbook;

pub use sheet::*;
pub use workbook::*;

#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {}
}