[Gambas-user] output to open office files
Benoît Minisini
gambas at ...1...
Wed Jan 20 14:55:02 CET 2010
> 2010/1/20 yuhej <robert1juhasz at ...626...>:
> > Hello Benoît,
> >
> > As far as I know we have no easy option to write data to open office calc
> > files like VB can do to excel.
> > Once I read in a comment of you - if my memory is correct - that you plan
> > to do a function for that but only in the far future. Is it previewed in
> > Gambas2 or do you have any schedule on that? It would be very useful.
>
> Hey, far be it from me to stick my nose in where isn't appreciated,
> but on this occasion I'll allow myself an indulgence.
>
> If you want "to write data to open office calc files like VB can do to
> excel", the Open Office source code is here:
>
> http://download.openoffice.org/2.1.0/source.html
>
> My response is excused by virtue of me being told almost exactly the
> same thing by [censored].
>
> HTH
>
More concretely, open office files are XML text files, so you don't really
need a binary interface on a black box as Microsoft did with Office.
Just uncompress the openoffice file with "unzip", modify the xml files inside,
and compress it back.
Of course you must know the OpenOffice format, which is a documented standard.
But if you have saved your openoffice files with no optimization, the
generated xml files can be read and understood with any text editor.
Otherwise, I have started to develop an API to access OpenOffice calc files
for myself, but it is to quick & dirty to be released. You just tell what you
want to put in which cell, and all the dirty work is done in the background
(uncompressing the openoffice file, inserting columns and lines when needed
inside the content.xml file, compress it back...)
Regards,
--
Benoît Minisini
More information about the User
mailing list