excel2df

Crates.ioexcel2df
lib.rsexcel2df
version
sourcesrc
created_at2025-04-14 01:50:26.154606+00
updated_at2025-04-21 01:12:35.041037+00
descriptionA library for converting Excel files to Polars DataFrame.It supports multiple threads to improve performance.
homepage
repository
max_upload_size
id1632295
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(RongZh86)

documentation

README

excel2df

A library for converting Excel files to Polars DataFrame

excel2df is a pure Rust library to read excel files(.xlsx) in to Polars DataFrame.

Now it(V0.1.2) supports multi_threads to read excel files. It can save more time (Almost 40%). It supports multi threads to read shared_strings in v0.1.3. It can save extral 10% time.

v0.1.4 : has fixed bugs for some different excel files.

v0.1.5: suports rust 2021+,and polars 0.45

Examples

Single thread to read excel file

use excel2df::Workbook;

let mut wb = Workbook::open("./test.xlsx").unwrap();
let range = wb.get_sheet_range("Sheet1");
let df = range.to_dataframe(0);
println!("{:?}", df);

Multi threads to read excel file

fn main(){
    let mut wb = Workbook::new("./sale.xlsx").unwrap();
    wb.set_threads_num(6);//set threads num

    let start = Instant::now(); 
    let range = wb.get_sheet_range2("Sheet1");
    let df = range.to_dataframe(10);

    let duration = start.elapsed();
    println!("Runing time: {:?}", duration);
    println!("Runing: {} miliSeconds", duration.as_millis());
    println!("{:?}",df)
}
Commit count: 0

cargo fmt