xlrd
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.
Unsupported Features
- Password-protected files
- Embedded Objects (Chars, Macros, Pictures, Worksheets etc.)
- Formulas
- VBA modules
- Comments
- Hyperlinks
- Autofilters, advanced filters, pivot tables, conditional formatting, data validation
Install
Run the following Cargo command in your project directory:
# If need to view the reading process
# When need to modify the data or formatting, may also need to add
Or add the following line to your Cargo.toml:
= "0.1.0"
# If need to view the reading process
= { = "0.1.0", = ["tracing"] }
# When need to modify the data or formatting, may also need to add
= "2"
Example
It's very simple, xlrd has only 3 functions:
xlrd::openxlrd::savexlrd::xls2xlsx
// Only just when enable the `tracing` feature
init;
let mut workbook = open.unwrap;
// After modify the data or formating...
save.unwrap;
// Or just convert to `.xlsx`, automatically save to the origin directory
let xlsx_path = xls2xlsx.unwrap;
Reference
License
MIT