[Gambas-user] Output to Libre Office Writer ??

Benoît Minisini gambas at ...1...
Sun Mar 31 23:53:51 CEST 2013


Le 31/03/2013 23:44, rocko a écrit :
> I don't know much about the capabilities of Gambas writing to Libre Office,
> as I don't think I ever heard of it being done before.
>
> I would like to read the names and addresses from an SQLite data base
> and put them into a Libre Office Writer template(.ods).
> Is this possible?
>
>
>
> Using Gambas 3 on Linux Mint 14.
>

I do that for my job.

I first creat a Write document (ods) where I put a special text 
everywhere I want to replace something. For example: $(name), 
$(address), $(town)...

Than I unzip the *.ods file, and modify the 'contents.xml' file by 
replacing the special text by their associated value.

Beware that 'contents.xml' is XML, and so some characters have to be 
quoted: & < > '

Once done, I zip the document back to an ods file. "Et voilà !".

-- 
Benoît Minisini




More information about the User mailing list