Skip to main content

Crate openprxl

Crate openprxl 

Source
Expand description

openprxl — a Rust spreadsheet library inspired by Python’s openpyxl.

§Quick start

use openprxl::{Workbook, Value, Style, Font};

let mut wb = Workbook::new();
let style_id = wb.register_style(Style::default().font(Font::default().bold(true)));

let ws = wb.active_sheet_mut();
ws["A1"] = "Hello".into();
ws["B1"] = 42.0.into();
ws.cell_mut("C1").unwrap().set_formula("=A1&B1");
ws.set_cell_style("A1", style_id).unwrap();

wb.save("example.xlsx").unwrap();

Re-exports§

pub use cell::Cell;
pub use cell::Value;
pub use error::Error;
pub use error::Result;
pub use reference::CellRef;
pub use reference::RangeRef;
pub use workbook::Workbook;
pub use worksheet::Worksheet;
pub use style::Alignment;
pub use style::Border;
pub use style::BorderStyle;
pub use style::DiagonalBorder;
pub use style::Fill;
pub use style::Font;
pub use style::HorizontalAlignment;
pub use style::NumberFormat;
pub use style::PatternFill;
pub use style::PatternType;
pub use style::Protection;
pub use style::Side;
pub use style::Style;
pub use style::StyleId;
pub use style::UnderlineStyle;
pub use style::VerticalAlignment;

Modules§

cell
Cell and value types.
date
Date conversion helpers.
error
Error and result types for openprxl.
reference
Parsing and formatting of A1-style cell references.
shared_strings
Shared string table used by .xlsx files.
style
Cell styling support.
workbook
Workbook API.
worksheet
Worksheet API.