rows icon indicating copy to clipboard operation
rows copied to clipboard

ODS Plugin

Open turicas opened this issue 11 years ago • 4 comments

Since an ODS is just a zip file with a XML an other meta-data files inside (and the spreadsheet data actually goes on the XML), we can use lxml (as we're already using it on plugin HTML) to deal with it.

There are two approaches, actually: 1- Use lxml (maybe slower, better to maintain and more accurate) 2- Use regular expressions (maybe faster, not so accurate and easy to maintain)

turicas avatar May 07 '14 06:05 turicas

There's a pretty messy implementation at https://github.com/okfn/messytables/blob/master/messytables/ods.py that might help as a starting point. It does manage to process the ODS files in https://github.com/okfn/messytables/tree/master/horror so it does work to some extent (even large.ods which extracts to ~98Mb).

rossjones avatar Jun 10 '15 15:06 rossjones

@rossjones, thanks! I'm thinking in not using regular expressions as they use for this implementations (actually they use lxml + regexps) since it can lead to some problems/more complexity (although it'd be probably faster). I'll try to reuse "horror" files on some tests.

turicas avatar Jun 15 '15 21:06 turicas

It might be useful to handle .lods as well (plain xml files without .zip archive).

randomstuff avatar Sep 28 '15 23:09 randomstuff

@randomstuff, are .lods files equal to the content.xml inside the .zip archive?

turicas avatar Oct 22 '15 00:10 turicas