#spreadsheet #ODS #sql #sqlite

app ods2sql

Create sqlite3 database from ODS spreadsheet

4 releases (2 breaking)

0.3.0 Mar 13, 2019
0.2.0 Jan 24, 2019
0.1.1 Sep 8, 2018
0.1.0 Aug 17, 2018

#14 in #sqlite

27 downloads per month

GPL-3.0+

19KB
237 lines

ods2sql build status

ods2sql creates SQLite database out of your ODS spreadsheet.

Details:

  • to simplify things, all data from spreadsheet is treated as TEXT SQLite type.
  • cells in the first row are used for SQLite column names
  • boolean cell values (e.g. true/false) are converted to TEXT type and saved as true / false text.
  • empty cells/errors are inserted as NULL SQLite value.

Caution!

It works for me, and if it eats your data that's your problem. Read the LICENSE.

Patches for bugs are welcome.

Usage

To create spreadsheet.sqlite out of spreadsheet.ods:

ods2sql spreadsheet.ods

Install

The easiest way is to use Cargo:

cargo install ods2sql

Don't forget to add place where Cargo installs binaries to your PATH for convenience, e.g.:

echo 'export PATH="$PATH:$HOME/.cargo/bin"' >> ~/.bashrc
source ~/.bashrc

Updating

In case of newer version, updating is almost like installing:

cargo install --force ods2sql

License

Licensed under GPLv3+. For details, see LICENSE.

Dependencies

~22MB
~392K SLoC