An open API service indexing awesome lists of open source software.

https://github.com/dawidcxx/excel2csv-cpp

Constant memory streamed excel2csv conversion
https://github.com/dawidcxx/excel2csv-cpp

cpp csv excel high-performance zig

Last synced: 19 days ago
JSON representation

Constant memory streamed excel2csv conversion

Awesome Lists containing this project

README

          

# Excel2Csv

Constant memory streamed excel2csv conversion

# About

![About Excel2Csv](./docs/readme-img.png)

Here is a crazy idea - what if your accountant's 5MB spreadsheet didn't OOM crash your server?

With `excel2csv` end to end streaming aproach this might finally be possible! Instead of asking hundreds if not thousands of megabytes in memory, we rarely need more than 10, even for the most demanding enterprise™️ sheets

```
[~/code/excel2csv-cpp (main)] $ ./zig-out/bin/excel2csv
xlsxpath: 1 argument(s) expected. 0 provided.
Usage: excel2csv [--help] [--version] xlsxpath

Positional arguments:
xlsxpath Path to the Excel file to convert

Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
```

# Is it perfect?

Nope. Contributions welcome. If a cell type isn't implemented or You need support for a older excel version feel free to open up a PR or fork the project.

# Development

Get [nix](https://nixos.org/) and set it up with [direnv](https://direnv.net/). Run:

`direnv allow`

This should download all package dependencies and set them up your current shell.

* `zig build cdb` - generates a `compile_commands.json` file, useful if you want to use clangd LSP autocomplete

* `zig build run -- myExcelFile.xlsx` - runs the application against the provided file

* `zig build compile -Doptimize=ReleaseSmall` - generates the target executable to `./zig-out/bin/excel2csv`

* `zig build run-tests -- --test-case="excelRow2Csv"` - runs just "excelRow2Csv" test cases