OCaml parsers for Office Open XML and XLSX (Excel) documents
The repo contains three libraries for reading data from Microsoft’s document
formats (“Office Open XML”).
open_packaging
parses Office Open XML’s “Open Packaging Conventions”spreadsheetml
parses the XML data in SpreadsheetML (i.e. Excel’s XLSXeasy_xlsx
reads XLSX documents, applies the formatting in the document,string list list
of data). The goal of this library is to give theopen_packaging
and spreadsheetml
are relatively safe to use but incomplete
(it should be obvious what they’re mising — if a field doesn’t exist, I
haven’t got to it yet). Everything that does exist should be parsed properly.
easy_xlsx
is in very early stages. It should properly give read XLSX files
and output correct types, but the SpreadsheetML spec doesn’t list all of the
built-in format strings, so some types may not be handled correctly. At the
moment, easy_xlsx
will bail out in any case where it can’t understand the
formatting, although I’d be open to patches to make this optional.
Install dependencies:
opam pin add -n easy_xlsx .
opam depext easy_xlsx
opam install --deps-only easy_xlsx
Then build:
make
You can run the tests if you want:
make test
The Makefile
is just a thin wrapper around jbuilder, so you can use
jbuilder commands too if you prefer.
If you want to help with this, create an issue with what you’d like to work
on, and mention it if you need me to help with anything (point you at the
relevant spec, give my opinion on approaches, etc.).
Some things I could use help with:
js_of_ocaml
too.