Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
carlvoller committed Sep 10, 2024
1 parent f78ddd0 commit f2fc2bb
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# excel-rs

A set of Rust and Python utilities to efficiently convert CSVs to Excel XLSX files.
An *extremely* fast set of Rust and Python utilities to efficiently convert CSVs to Excel XLSX files.

This library is available as a CLI tool and Python PIP package.

This library was created with the goal of being simple, lightweight, and *extremely* fast. As such, many features such as Excel formatting is not currently supported. This library gives you the quickest possible way to convert a `.csv` file to `.xlsx`.
This library was created with the goal of being simple, lightweight, and *extremely* performant. As such, many features such as Excel formatting is not currently supported. This library gives you the quickest possible way to convert a `.csv` file to `.xlsx`.

The Python utilities also gives you the quickest possible way to export a Pandas DataFrame, Numpy 2D array or Postgres database as a `.xlsx` file.

## Python

Expand Down Expand Up @@ -67,15 +69,22 @@ with open('report.xlsx', 'wb') as f:
```

## Command Line Tool
To install, download the latest release of `cli-excel-rs` for your platform from Release [here](https://github.com/carlvoller/excel-rs/releases?q=cli-excel-rs&expanded=true).
To install, download the latest release of `cli-excel-rs` for your platform from Github Releases [here](https://github.com/carlvoller/excel-rs/releases?q=cli-excel-rs&expanded=true).
```bash
$ wget https://github.com/carlvoller/excel-rs/releases/download/cli-0.2.0/excel-rs-linux-aarch64.zip
$ unzip excel-rs-linux-aarch64.zip
$ chmod +x ./cli-excel-rs
```
Then simply run the binary:
```bash
./cli-excel-rs csv --in my_csv.csv --out my_excel.xlsx
$ ./cli-excel-rs csv --in my_csv.csv --out my_excel.xlsx
```

If you would like the build the binary yourself, you can do so using these commands:
```bash
$ git clone https://github.com/carlvoller/excel-rs
$ cargo build --release
$ ./target/release/cli-excel-rs csv --in my_csv.csv --out my_excel.xlsx
```

## Rust
Expand All @@ -93,7 +102,7 @@ Tests were conducted on an Macbook Pro M1 Max with 64GB of RAM
#### py-excel-rs (2.89s)
```
$ time python test-py-excel-rs.py
python3 test-py-excel-rs.py 2.00s user 0.18s system 99% cpu 2.186 total
python3 test-py-excel-rs.py 2.00s user 0.18s system 99% cpu 2.892 total
```

#### openpyxl (97.38s)
Expand Down Expand Up @@ -126,6 +135,19 @@ $ time python test-pyexcelerate.py
python3 test-pyexcelerate.py 35.27s user 0.33s system 99% cpu 35.821 total
```

### Command Line Tools

#### cli-excel-rs (2.756s)
```bash
$ time ./cli-excel-rs csv --in organizations-1000000.csv --out results.xlsx
./cli-excel-rs csv --in organizations-1000000.csv --out 2.69s user 0.07s system 99% cpu 2.756 total
```

#### [csv2xlsx](https://github.com/mentax/csv2xlsx?tab=readme-ov-file) (33.74s)
```bash
$ time ./csv2xlsx --output results.xlsx organizations-1000000.csv
./csv2xlsx --output results.xlsx organizations-1000000.csv 57.63s user 1.62s system 175% cpu 33.740 total
```

### Rust

Expand Down

0 comments on commit f2fc2bb

Please sign in to comment.