On 01/16/11 08:30, Rolf Stöckli wrote:
Am 16.01.2011 15:25, schrieb [email protected]:
How do you export data (invoices or customers lists) to Excel or CSV
file
At the moment you can't, but it's one part of my interfaces project to
produce such lists. See:
https://github.com/Tekki/ledger123-testing/tree/interfaces-devel
You already find an example of how to produce a customer list in JSON
format:
https://github.com/Tekki/ledger123-testing/blob/interfaces-devel/bin/mozilla/testcustomerlist.pl
Additionally, if your database runs in the local network, you can use
the view v_customers as a data source for example in OpenOffice.
Regards
Rolf
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger
IF you have some degree of access to the DB itself you might be able to
do this using psql:
db> \? For all kinds of information.
db> \H Set output to html. It's an (aligned/html) toggle.
db> \cd /tmp Changes location to that directory.
db> \o 'file.extension' Sets the output file's name and type.
db> select * from charts limit 3; Submits query and writes output to
a file called /tmp/file.extension.
dg> \q Quits to a prompt. I believe quitting will also reset all toggles
to their defaults.
You can script this somewhat like a DOS batch file or a shell script.
You'll have to do your homework:
psql -U someuser -d somedb < /tmp/my_script.txt
Of course, if your account and/or db have not been set up wisely you
might unknowingly wield a great deal of power; think a bit before
hitting 'Enter'. Or wait for somebody to perl-ify such actions within
the app.
hth
r
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger