This site requires JavaScript to be enabled

IncidentLookup using list
How can we help?

Solution Suggestions

Please enter your question to get suggestions.
Boolean Operators
OR or vertical bar symbol (|)
Finds a match if either the terms exist in a document (a union using sets).
Finds a match if both terms exist in a document (an intersection of sets).
NOT, minus (-), or exclamation point (!)
Excludes documents that contain the term after NOT (a difference of sets).
Asterisk (*)
The asterisk symbol performs a multi character wildcard search.
Percent sign (%)
The percent sign performs a single character wildcard search.
Quotation marks (")
Use quotation marks to search for an exact phrase with multiple terms.
For examples and more information look at our Knowledge Base: Advanced Search On The Support Portal

Query an Excel File with Database Engine

This article explains how to connect to an Excel file using the Database Engine to perform SQL queries using the standard modules.


If you need to generate a baseline file, filter tables based on conditions, or generally run SQL queries against an Excel file. This will also show how to connect without needing to establish an ODBC connection for each Excel file you want to read, as the information will be set with your connection string.


This solution requires the use of Excel ODBC Driver 32-Bit, which should be installed with all Windows Office solutions. It can be downloaded as a part of the Microsoft Access Database Engined 2010 Redistributable located here.

This solution requires the Tosca Aidpack, which can be downloaded from our Downloads section here.


Create a new Test Case, and add the DB Expert Module Classic as a test step. Using the DB Expert Module Classic, you can connect to an Excel File by setting the connection string value to the following:

Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};Dbq=C:\Temp\Excel1.xlsx;

Where you set the value of Dbq to be the full file path of the Excel file.

To return the values of the entire TestSheet you use the following SQL Statement:

Select * from [TestSheet$]

TestSheet must be replaced with the name of the Testsheet you are trying to query.

The column names are determined by the first row of the Excel Spreadsheet.

Once set up, the TestStep to verify a value should look like this:

Queries against Excel files must be written in Microsoft SQL Format, and can be limited by using WHERE clauses.

The Range of an excel Testsheet can be set following the $:



3 0

Philipp Dessovic

Created: 2019-08-28 14:24:57

This also works with the newer TBox DB Expert module if the driver "Generic ODBC" is selected and the connection string is within quotation marks.

0 0

Vishal Chaudhry

Created: 2020-09-23 10:16:53

On adding where clause, I am only getting Header rows



SELECT * FROM ["New Activation BAN TCs"$] where 'Test Case Number' ='FCT 10'

0 0

Vishal Chaudhry

Created: 2020-09-23 10:16:56

On adding where clause, I am only getting Header rows



SELECT * FROM ["New Activation BAN TCs"$] where 'Test Case Number' ='FCT 10'