Excel File Source

Open in CMS

The SQL Database Reader can answer questions from an Excel workbook you upload, with no database at all. Each sheet becomes a table, so an agent can answer "total paid orders per customer since February" from a spreadsheet the same way it would from a database.


When to use it

Excel fileDatabase (direct or gateway)
Needs a databaseNoYes
Network access to your systemsNoneA database port, or an outbound gateway
Data freshnessA snapshot β€” upload a new version to refreshLive
SizeUp to 20 MB per workbookWhatever your database holds

Choose the Excel file for data that lives in spreadsheets, for prototypes, and for small reference data that changes now and then. Choose a database connection when the data changes continuously or is larger than a workbook.


Try it with the sample workbook

Download retail-sales-sample.xlsx to follow along. It holds three years (2023–2025) of sales for a small retail chain with 10 stores β€” eight in the United States, one in Singapore and one in Jakarta β€” with every amount in US dollars:

SheetRowsWhat it holds
Stores10store_id, name, city, state/region, country, opening date, size, is_flagship
Products25product_id, name, category (Apparel, Footwear, Electronics, Home, Beauty, Accessories), unit price and unit cost in USD
Sales4,000One row per store, product and day: sale_date, store_id, product_id, units_sold, unit_price_usd, discount_pct, channel (In-store or Online), on_promotion
Monthly Targets354Revenue target in USD per store and month (month is the first day of the month)

After uploading it, add these virtual foreign keys so questions can combine sheets:

  • Sales.store_id β†’ Stores.store_id
  • Sales.product_id β†’ Products.product_id
  • Monthly Targets.store_id β†’ Stores.store_id

It also helps to describe the revenue rule on the Sales table, e.g. "Revenue = units_sold Γ— unit_price_usd Γ— (1 βˆ’ discount_pct)". Then try questions such as:

  • Which store had the highest revenue in 2025?
  • Show the monthly revenue of the Singapore store in 2024.
  • Which product category grew the most between 2023 and 2025?
  • In which months of 2025 did the Jakarta store miss its target?
  • What share of 2025 revenue came from online sales in each country?

Preparing the workbook

  • One table per sheet. The sheet name becomes the table name.
  • Field names in row 1, starting in cell A1. No title rows or notes above them.
  • Every column with data needs a unique field name. Names are compared without regard to case, so Total and total clash.
  • Do not merge header cells. Merged cells in the data are allowed, but only the top-left cell keeps the value.
  • Keep each column to one kind of value. A column that mixes numbers and text is stored as text.
  • Use real Excel dates rather than dates typed as text, so the agent can filter and group by them.
  • Formulas are fine β€” the values Excel last calculated are used.
  • Blank rows are skipped, empty sheets are ignored, and hidden sheets are included.

Limits

Limit
File type.xlsx (old .xls files: open in Excel and save as .xlsx)
File size20 MB
Rows per sheet200,000
Fields per sheet500
Cells per workbook3,000,000
Password-protected workbooksNot supported β€” remove the password first

Setting it up

1. Choose Excel file

Open the SQL Database Reader plugin from Tools β†’ Plugins. On Where does your data come from?, pick Excel file. The Connection step is replaced by an Excel File step; there is nothing to connect to and no credentials to enter.

2. Upload and check the workbook

Drag the workbook onto the upload area or click Browse. Qlar uploads it and checks it before anything is saved.

If the workbook is valid you see a summary: the number of tables, fields and rows, and for each sheet its row count and every field with the type Qlar detected:

Detected typeMeaning
INTEGERWhole numbers
REALNumbers with decimals
TEXTText, or a column that mixes kinds of values
BOOLEANTRUE / FALSE
DATEDates without a time of day
DATETIMEDates with a time of day

Warnings β€” an empty sheet that was skipped, a column stored as text because it mixes values β€” are listed above the summary. They do not stop you.

If the workbook is not valid, every problem is listed with the sheet and cell it is in, for example Sales β€Ί C1 β€” Column C has data but no field name in row 1. Nothing is stored. Fix the file in Excel and choose it again.

3. Tables, settings and testing

A workbook has no foreign keys, so Qlar does not know how sheets relate. If questions need to combine sheets β€” orders with the customers who placed them β€” tell it which field points at which with Virtual Foreign Keys, for example Orders.customer_id β†’ Customers.id.

From here on the setup is the same as for a database: choose which tables and fields the agent may use and describe them (Configure Tables and Columns), set the function name and behaviour (Function Tool Settings), and save. Testing Queries and Usage Logs work unchanged.


Updating the data

The agent answers from the version of the workbook you uploaded. When the data changes:

  1. Open the plugin and go to the Excel File tab. It shows the active file, when it was uploaded, and its tables.
  2. Click Replace with a new file and upload the new version. It is checked exactly like the first upload.
  3. Qlar shows what changes β€” tables added or removed, row counts, new or removed fields, fields whose type changed β€” and asks you to confirm with Replace & save.

Descriptions and field selections are kept for tables and fields that keep their names; new fields start selected. Until you confirm, the agent keeps answering from the current file.


Where the file is kept

The workbook is stored in Qlar's own private storage, together with a read-only copy that questions are answered from. It is never public, and only this agent's configuration can read it.

  • Replacing the file deletes the previous version.
  • Deleting the plugin configuration, or the agent, deletes the file.
  • A file that was uploaded but never saved into a configuration is deleted automatically after a day.

As with any data source, the rows a question returns are passed to the AI model to write the answer. Leave columns that must not be shared out of the selection, or out of the workbook.