Utility for saving Postgres SQL queries results to .xlsx file
- Python 3.x
- psycopg2
- xlsxwriter
Help
user@localhost:~$ ./psql2xlsx.py -h
Config
user@localhost:~$ nano config.ini
Run
user@localhost:~$ ./psql2xlsx.py -o /tmp/1.xlsx
[..] Generated page :: page1 ...
[OK] PostgreSQL successfully connected
[..] Generated page :: page2 ...
[OK] PostgreSQL successfully connected
[..] Generated page :: page3 ...
[OK] PostgreSQL successfully connected
[OK] Workbook saved :: /tmp/1.xlsx
See also WiKi page.