Re: c++-code for reading and writing in .gnumeric files



If you are wanting to write gnumeric files you could also try:

http://www.earthenware-services.org/earthenwarewiki/PworkBook

For small sheets this works pretty well.

I guess it would be handy to have something that parses an existing gnumeric file and creates a pworkbook object from it, then you'd be sorted (I suspect this is easier to write than do, although something that did a reasonable job for simple sheets probably wouldn't be a lot of work).

If you need xls you can just use ssconvert (part of gnumeric) to convert your gnumeric sheets to xls + if/when the gnumeric->pworkbook utility is written you would have everything you need.

John

On Wed, 2004-07-28 at 15:44, msevior physics unimelb edu au wrote:
> Hello together
>
> [sorry for sendig this mail twice...]
>
> Here is the following question.
>
> I would like to access directly the contents of a .gnumeric file.
>
> Is there an c++-interface for this (say when the operating system is
> Linux)?
>
> That is, I want to write a c++ program that reads data from a given
> .gnumeric file manipulates it in a certain prescribed way and writes the
> result into a new (or existing) .gnumeric file.
> A similar question for .xls files.
>
> I am definitely sure that there are such interfaces (defined by libraries,
> classes ...)  for c++.
>
> Any hints are welcome.
>

Well it really depends how much of gnumeric's very rich feature set you
want/need to support.

I wrote some code that exports a GTK tree model widget to gnumeric in
about 100 lines of Python. All I did was to gunzip a gnumeric file and
stare at the XML.

You can find the code in the MyBudget.py program at...

http://www.abisource.com/~msevior

or in the divifund module in gnome CVS.

I plan to break that code out into it's own module and class Real Soon Now.

XLS... well that's a whole other story.

Cheers,

Martin

> Thank you for your help
>
> Martin
>
> In the case of the language Java the construction of an interface for
> manipulating and building Excel files within a running Java routine is
> part
> of the Jakarta project (cf. http://jakarta.apache.org/poi/).
>
>
>
> --
> NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
> GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl
>
> _______________________________________________
> gnumeric-list mailing list
> gnumeric-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnumeric-list
>

_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list


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