Dear all,
Wouldn’t it be great to have a plugin covering SQL/database queries into the spreadsheet editor for MSSQL, MariaDB, PostgreSQL, … ?
I think on sth like Powerqueries in Excel but perhaps build on R and python and predefined opensource technology to add statements and load data in a cell.
Is there any ongoing project to cover such functionality?
Kr
–P.
Hey @promexio, 
Great idea!
As far as I know, we already have an open feature request for adding external data connections (MSSQL, PostgreSQL, etc.) to ONLYOFFICE Desktop — basically the ability to connect to a database, run queries, and pull the results into cells (very similar to Power Query in Excel).
Is that exactly what you’re suggesting, or are you thinking of something different?
Let me know and I’ll link your request to the existing one so it gets more votes! 
Thanks!
1 Like
Hey,
Thx for your comment.
I’m thinking of the following:
→ Having two datatypes: (a) field value and (b) tables
(a) does retrieve one exact value from a sql source table matching unlimited filter criteria (being stored in various cells of any sheet)
(b) retrieves the selected columns of a sql table matching unlimited filter criteria (being stored in various cells of any sheet)
e.g.
database table ‘customer’
open the data selector … chose field value option, select the database field ‘Name’ and put the filter criteria which is stored in cell A1 ‘Customer no’ fills cell B1 with the name.
add a filter criteria “sql” allowing to put sql statements e.g. in a cell you may select as a filter
1 Like
I’ve been trying to create a plugin, but can’t get around to have it appear in the ribbon so I can use it.
The behaviour would be as such:
- If you have a sheet called _import and it follows the configuration, it will perform a xlsx query for each line;
- In the sheet, you have columns for the origin (path, filename, sheet, upper_left cell, lower_left), the target (sheet, upper_left) and some query behaviour data (whether it automatically overrides existing data, if it’s auto and silent or asks to start, the last status, etc)
- When you run it, it will simply lookup the data in the origin, show in a dialog box how the data is now and how it will become (first two and lines lines and columns).
I managed to create the plugin and import it to the plugin manager, but couldn’t get it to appear in the ribbon… I can share the code (it’s nothing special, I just don’t know if we can in this space)
Hello @Akh608
Sure, go ahead. You can attach your plugin and detailed steps how it works along with steps you followed to add it to the editor. We’ll take a look at it.
Also please clarify the product you’re using. Desktop app or self-hosted Document server?