openprxl/lib.rs
1//! `openprxl` — a Rust spreadsheet library inspired by Python's `openpyxl`.
2//!
3//! # Quick start
4//!
5//! ```no_run
6//! use openprxl::{Workbook, Value, Style, Font};
7//!
8//! let mut wb = Workbook::new();
9//! let style_id = wb.register_style(Style::default().font(Font::default().bold(true)));
10//!
11//! let ws = wb.active_sheet_mut();
12//! ws["A1"] = "Hello".into();
13//! ws["B1"] = 42.0.into();
14//! ws.cell_mut("C1").unwrap().set_formula("=A1&B1");
15//! ws.set_cell_style("A1", style_id).unwrap();
16//!
17//! wb.save("example.xlsx").unwrap();
18//! ```
19
20pub mod cell;
21pub mod date;
22pub mod error;
23pub mod reference;
24pub mod shared_strings;
25pub mod style;
26pub mod workbook;
27pub mod worksheet;
28
29mod pack;
30mod xml;
31
32pub use cell::{Cell, Value};
33pub use error::{Error, Result};
34pub use reference::{CellRef, RangeRef};
35pub use workbook::Workbook;
36pub use worksheet::Worksheet;
37
38pub use style::{
39 Alignment, Border, BorderStyle, DiagonalBorder, Fill, Font, HorizontalAlignment,
40 NumberFormat, PatternFill, PatternType, Protection, Side, Style, StyleId, UnderlineStyle,
41 VerticalAlignment,
42};