Easily query your database using LLMs without writing SQL and then import the data into Microsoft Excel.

Get your data by asking LLM, and instantly analyze and visualize data on Excel with Excel Add-in.

Howard Chi
Co-founder of Wren AI
July 11, 2024
September 8, 2024
5 min read

Excel remains one of the most popular spreadsheet programs globally, and millions of people use it for various tasks, such as calculations and complex data analysis. Excel is a primary productivity tool for operations, analysts, product, sales, and marketing teams, enabling them to organize, analyze, and visualize data.

However, manually querying data from various data sources such as databases and data warehouses and importing data into Excel can be time-consuming and tedious. Most importantly, business users are not familiar with the interfaces of databases — SQL. Hence, users highly depend on the data team to retrieve data from sources and output it in Excel format to start using the dataset in Excel.

Using Wren AI to connect LLMs to query your data and import it to Excel directly.

Now, with Wren AI supporting Excel, users can ask business questions to Wren AI to retrieve data from any source and use the Wren AI Excel add-in to import data into Excel in just one click seamlessly. This allows for a complete end-to-end data retrieval from databases to Excel without SQL, manual exporting, or importing data in various formats.

Today, in this post, I’ll share with you how to do it in a step-by-step tutorial, using our Wren AI Demo Site as an example; if you used Wren AI to connect to your data sources, you could install Wren AI Excel Add-in and import data into your Excel.

If you need guidance on using Wren AI to connect to your data sources using OpenAI API or hosting locally with Ollama, please check our previous articles below:

  1. How to use OpenAI GPT-4o to query your database?
  2. How to use Meta Llama 3 to query MySQL database using Ollama and Wren AI

What is Wren AI?

Before we start, if you are unfamiliar with Wren AI, you can check out GitHub first. Wren AI is an open-source text-to-SQL solution for data teams to get results and insights faster by asking business questions without writing SQL. Wren AI supports a wide range of data sources, such as DuckDB, MySQL, Microsoft SQL Server, BigQuery, etc... Also, she supports open and local LLM inference endpoints such as OpenAI GPT-3-turbo, GPT-4o, and local LLM hosts via Ollama.

Wren AI — Ask business questions and get answers from any sources

Import data from Wren AI to Excel

We will use the Wren AI demo site in this tutorial, which you can also check out here. In the Wren AI demo site, you can see several threads asked by previous users.

Questionnaires asked by users in the Wren AI demo site

When you switch to the Modeling tab on the top menu bar. It shows the semantic modeling of the sample dataset.

Semantic modeling page in Wren AI

Now, we are going to import one of the results from the threads and also import the view Total orders by product to Microsoft Excel.

Install Wren AI for Excel via AppSource

The Wren AI Excel add-in support on the following versions of Excel.

  • Excel 2013 or later on Windows
  • Excel 2016 or later on Windows
  • Excel 2016 or later on Mac
  • Excel 2019 or later on Windows
  • Excel 2019 or later on Mac
  • Excel on the web
  • Excel on Mac (Microsoft 365)
  • Excel on Windows (Microsoft 365)

Visit AppSource here; when you click the link, you will be guided to the following page below.

Wren AI page on AppSource

After clicking Get it now on the Microsoft AppSource. It will ask for your confirmation to continue the progress.

Confirm to continue

After clicking Get it now, it'll guide you to the deploy page; you can choose whether to deploy in an individual account, your organization, or others.

Deploy the add-in for individuals or in an organization.

Install Wren AI for Excel in Excel

Alternatively, you can install Wren AI for Excel through Add-ins that is built in your Excel, as below.

Open your Excel; you can find the Add-ins button in your toolbar

You can search the Wren AI for Excel and add it to your Excel.

Search for Wren AI on your Add-ins

Click Add to install to your Excel. After installation, you will see a new icon on your toolbar, it’s Wren AI!

Connect to your Wren AI Server

Now, you can connect to your Wren AI server; in this example, we will connect to https://demo.getwren.ai/home, enter https://demo.getwren.ai and click Connect .

Due to Mixed content issues, the Office Desktop and Safari browser do not support HTTP or localhost URL connections; only HTTPS is supported.

For better support, we recommend using Office Online with Chrome or Edge.

Connect to https://demo.getwren.ai

After connecting to the Wren AI server, you can export data from an answered result or from a saved view.

You can choose to import from a thread or a saved view.

If you click on the “export data from an answered result”, it will list out all the thread history, and you can choose one of the datasets to import into your Excel.

List of the thread history

If you click “export data from a saved view”, you can select one of the saved views from your server.

List of the views

Export datasets to Excel

Click export to sheet; the add-in will export the data to your spreadsheet, as shown below.

Start analyzing data in Excel!

You can now use Excel's powerful tools and functions to analyze your data. Such as the built-in Excel Analyze Data feature in Excel.

You can start Analyzing data in Excel.
Building visualization charts in Excel.

And that’s about it!

Check out Wren AI GitHub (https://github.com/Canner/WrenAI) and start analyzing your data!

You can also check out our Excel add-in document here to learn more.

Supercharge Your Data with AI Today?!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Join our newsletter to stay up to date on features and releases.
© 2024 Canner. All right reserved.