If you have data in multiple sheets in Excel you can use a union in the SmartConnect query to combine all the data from multiple sheets. Previewing the data will return the same results. To get the same results as the named range above we can write the query as select * from. This will eliminate all the blank rows with the current data and allow the Excel sheet to have data added to it continuously without having to change the query in SmartConnect.Īnother option is setting the range directly in the query from SmartConnect. The new query would be select * from addressinfo where Name ”. You could fix this by setting the named range to include a set of rows as well, or you can modify the query a bit so that the rows can dynamically be added and queried later. One thing you will notice is that it will also select blank rows because our named range infinitely continues on the rows. When you preview this query you will only get data from the named range as it was setup in Excel. To start, in Excel we can create a Named Ranged and then query that range specifically to get only the data range we need.Ĭolumns B through G have be defined as a named ranged called “addressinfo.” In SmartConnect we can query the named range to exclude all the additional data in the Excel sheet we do not need at this time. We are going to start with the following Excel file for example.
![how to inquery odbc excel how to inquery odbc excel](https://www.eonesolutions.com/wp-content/uploads/2016/06/062416_1351_Troubleshoo1.png)
![how to inquery odbc excel how to inquery odbc excel](https://i.ibb.co/6FXvqRL/ODBC-query-with-Excel-cells-parameters2.png)
#How to inquery odbc excel driver
This will allow you to write your own query and use all of the functionality of the ODBC Excel driver directly in SmartConnect. Another option that will allow more flexibility is to connect to the Excel file with an ODBC Connection. This sample pulls all the records from the selected sheet. Most often when a user needs to use an Excel file for their source data in SmartConnect they choose Microsoft Excel as their Data Source and then choose the Sheet that contains the data they need.