Gnumeric as a cli spreadsheet format converter



On Tue, Mar 11, 2003 at 09:24:54AM -0500, Russell McOrmond wrote:
  Please send me an email detailing your suggestion and I will forward it 
to the students.   They write documentation/specifications this month, but 
don't code until October-November time-frame (Officially - one student 
suggested he may start on the side during his summer work term).

Gnumeric uses a full Model View Controller separation making it
entirely possible to do a non-gui based application using it's code.
There are already hooks in gnumeric/src/Makefile.am to build
    'ssconvert'
to do exactly that.  File formats (import and export) are generally
supported in plugins (what excel calls Addins).  This makes them
nicely modular and very easy to work on.  The import/export code
translates directly to/from Gnumeric native data structures and the
format of interest.  This is significantly simpler than creating a
stand-alone representation specific to a file format and translating
from
    disk -> format specific data structures
and again from
    format specific data structures -> Gnumeric data structures.

Doing a qpro -> Oasis Office format converter would entail 2 main
steps, and 1 polishing step.

1) Extend the existing qpro importer in Gnumeric to support more of
   the qpro features, and newer versions.  There is documentation
   for the formats and the code is clean enough for easy development.

2) Write an Oasis Office exporter for Gnumeric.  There is an
   existing importer and some simple support code for generating
   valid XML quickly libgsf (using an xml DOM style interface is not
   a good idea for spreadsheet files).  This would likely represent
   the majority of the work.  However, since Gnumeric already has an
   xml based format there is a good deal of code to fall back on and
   examine.

3) As an afterthought it would be nice to support additional command
   line flags to configure the exporter or importer. eg
        ssconvert --out-oo-version=2 file.wb2 result.sxc 
    to support a mythical version 2 of the oo format.

    This could be done by adding a new plugin service (50 lines of
    code) to support the definition of some popt args for the
    import/export plugins.


The nice side effect of this work would be a command line converter
for all of the other formats Gnumeric supports.
eg
    ssconvert file.xls result.sxc

Working on import/export plugins tends to be quite open ended.  Once
the initial version is in place supporting additional features of the
formats tends to be done incrementally.  Which should offer a fair
amount of flexibility in how much work the team would do.

Hope that helps
    Jody

PS
    Please contact me if you've got questions email or irc
        (irc.gnome.org #gnumeric)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]