'Fetching Query Result Directly Into an Excel Cells

I am currently using Oracle Apex to write queries and copy and paste the results into an Excel file. I have also used mySQL Workbench in the past.

My question is it possible to link a database to Excel and produce the results? For example in cell A1 I would want to type "select sum(sales) from accounts" and when I click enter, the result would appear in that cell after fetching the query?

I may be over thinking it or expecting something that is not possible. Any help is appreciated



Solution 1:[1]

You can connect your excel with a database and pull the data to the sheet, but writing queries in an individual column still need to figure out. In between, you can take a look at the ODBC configuration to connect excel with the database, Hope this will give some insights.

https://www.devart.com/odbc/mysql/docs/excel.htm

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jijo Alexander