I'm currently using Microsoft Excel to execute Stored Procedures on a SQL Server database and it is working fine.
If anyone is interested there are really nice instructions here http://datapigtechnologies.com/blog/index.php/running-a-sql-stored-procedure-from-excel-with-dynamic-parameters/
I was wondering if it's possible to do something like this with LibreOffice Calc and PostgreSQL.
I know that LibreOffice supports PostgreSQL connections as you can create a PostgreSQL odb file but I was wondering if it's possible to execute Stored Porcedures/Functions in a similar way to how Excel does it
It is possible to do something similar in LibreOffice Calc, but instead of setting up the database connection with various menus, everything is done with macro code.
The following worked for me using this MySQL stored procedure:
The code is adapted from https://forum.openoffice.org/en/forum/viewtopic.php?f=21&t=41149.
To finish the code, modify it to put the results into the spreadsheet instead of displaying them in a message box. Also read the selected value from the drop-down box instead of hardcoding the value of
sFormat
.Note: Some information online suggests using an intermediate .odb file. That would involve more menus rather than doing everything in the macro. This works for tables and queries but apparently not for stored procedures, unless perhaps with HSQLDB as mentioned here.