Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsoding/minicel
Simple Excel engine without any UI
https://github.com/tsoding/minicel
Last synced: 5 days ago
JSON representation
Simple Excel engine without any UI
- Host: GitHub
- URL: https://github.com/tsoding/minicel
- Owner: tsoding
- License: mit
- Created: 2021-07-14T11:25:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-18T10:56:32.000Z (over 3 years ago)
- Last Synced: 2024-08-01T21:42:09.599Z (3 months ago)
- Language: C
- Size: 67.4 KB
- Stars: 54
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Minicel
The idea is to implement a batch program that can accept a CSV file that looks like this:
```csv
A | B
1 | 2
3 | 4
=A1+B1 | =A2+B2
```And outputs:
```csv
A | B
1 | 2
3 | 4
3 | 7
```Basically a simple Excel engine without any UI.
## Quick Start
The project is using [nobuild](https://github.com/tsoding/nobuild) build system.
```console
$ cc -o nobuild nobuild.c
$ ./nobuild
$ ./minicel csv/sum.csv
```## Syntax
### Types of Cells
| Type | Description | Examples |
| --- | --- | --- |
| Text | Just a human readiable text. | `A`, `B`, `C`, etc |
| Number | Anything that can be parsed as a double by [strtod](https://en.cppreference.com/w/c/string/byte/strtof) | `1`, `2.0`, `1e-6`, etc |
| Expression | Always starts with `=`. Excel style math expression that involves numbers and other cells. | `=A1+B1`, `=69+420`, `=A1+69` etc |
| Clone | Always starts with `:`. Clones a neighbor cell in a particular direction denoted by characters `<`, `>`, `v`, `^`. | `:<`, `:>`, `:v`, `:^` |