| Crates.io | xlrd |
| lib.rs | xlrd |
| version | 0.1.1 |
| created_at | 2025-09-24 05:41:24.504369+00 |
| updated_at | 2025-10-11 01:42:37.257438+00 |
| description | A historical Excel BIFF8 xls format file reader in pure Rust |
| homepage | |
| repository | https://github.com/PleaseDont/xlrd |
| max_upload_size | |
| id | 1852540 |
| size | 122,792 |
A Rust port of Python's xlrd ?
The library is a pure Rust library used for reading data and formatting information from Excel files in the historical .xls BIFF8 format.
It focuses solely on reading basic data and formatting information, and store them in the umya-spreadsheet::Spreadsheet structure, so you can easily modify and save it as .xlsx.
Run the following Cargo command in your project directory:
cargo add xlrd
# If need to view the reading process
cargo add xlrd --features tracing
# When need to modify the data or formatting, may also need to add
cargo add umya-spreadsheet
Or add the following line to your Cargo.toml:
xlrd = "0.1.0"
# If need to view the reading process
xlrd = { version = "0.1.0", features = ["tracing"] }
# When need to modify the data or formatting, may also need to add
umya-spreadsheet = "2"
It's very simple, xlrd has only 3 functions:
xlrd::openxlrd::savexlrd::xls2xlsx// Only just when enable the `tracing` feature
tracing_subscriber::fmt::init();
let mut workbook = xlrd::open("path/from/your/file.xls").unwrap();
// After modify the data or formating...
xlrd::save(&workbook, "path/to/your/file.xlsx").unwrap();
// Or just convert to `.xlsx`, automatically save to the origin directory
let xlsx_path = xlrd::xls2xlsx("path/from/your/file.xls").unwrap();
MIT