# 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 supports multi_threads to read excel files. It can save more time.
# Examples
## Sigle thread to read excel file
```rust
use excel2df::Workbook;
let wb = Workbook::open("./test.xlsx").unwrap();
let range = wb.get_sheet_range("Sheet1");
let df = range.to_dataframe(0);
println!("{:?}", df);
```
## Multi thread to read excel file
```rust
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)
}
```